Allow True in bool_child.
authorCarl Hetherington <cth@carlh.net>
Wed, 13 Jan 2016 09:44:56 +0000 (09:44 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 13 Jan 2016 09:44:56 +0000 (09:44 +0000)
src/cxml.cc

index fb8ca2d42637f9f61275b60c61522fbfa28e03fb..567dc503d53f4f7b200c2f6c9ebf8863bfd7ef64 100644 (file)
@@ -121,7 +121,7 @@ bool
 cxml::Node::bool_child (string c) const
 {
        string const s = string_child (c);
 cxml::Node::bool_child (string c) const
 {
        string const s = string_child (c);
-       return (s == "1" || s == "yes");
+       return (s == "1" || s == "yes" || s == "True");
 }
 
 optional<bool>
 }
 
 optional<bool>
@@ -132,7 +132,7 @@ cxml::Node::optional_bool_child (string c) const
                return optional<bool> ();
        }
 
                return optional<bool> ();
        }
 
-       return (s.get() == "1" || s.get() == "yes");
+       return (s.get() == "1" || s.get() == "yes" || s.get() == "True");
 }
 
 void
 }
 
 void