diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2006-12-11 14:00:37 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2006-12-11 14:00:37 +0000 |
commit | 79769db47c9413a39add063072abfab3b1f35c22 (patch) | |
tree | 7376cd3750d0c21f5c2cfc178616280198854092 | |
parent | 9db5197f82781c685a8ea3f354c114216aa8519e (diff) |
Now should compile on gcc without errors/warnings
git-svn-id: http://pugixml.googlecode.com/svn/trunk@20 99668b35-9821-0410-8761-19e4c4f06640
-rw-r--r-- | src/pugixml.cpp | 7 | ||||
-rw-r--r-- | src/pugixml.hpp | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index d0d581b..43050ed 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -13,7 +13,6 @@ #include "pugixml.hpp"
-#include <cstring>
#include <cstdlib>
#include <new>
@@ -174,7 +173,9 @@ namespace pugi for (; *s; ++s)
{
- if (*s < 0x80 || (*s >= 0xC0 && *s < 0xFC)) ++length;
+ unsigned char ch = static_cast<unsigned char>(*s);
+
+ if (ch < 0x80 || (ch >= 0xC0 && ch < 0xFC)) ++length;
}
return length;
@@ -1066,7 +1067,7 @@ namespace pugi {
}
- xml_node_struct::xml_node_struct(xml_node_type type): name(0), value(0), prev_sibling(0), next_sibling(0), first_child(0), last_child(0), first_attribute(0), last_attribute(0), type(type)
+ xml_node_struct::xml_node_struct(xml_node_type type): type(type), parent(0), name(0), value(0), first_child(0), last_child(0), prev_sibling(0), next_sibling(0), first_attribute(0), last_attribute(0)
{
}
diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 009b10a..22e5c52 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -22,6 +22,9 @@ # include <istream>
#endif
+#include <cstddef>
+#include <cstring>
+
/// The PugiXML Parser namespace.
namespace pugi
{
|