From 79769db47c9413a39add063072abfab3b1f35c22 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Mon, 11 Dec 2006 14:00:37 +0000 Subject: Now should compile on gcc without errors/warnings git-svn-id: http://pugixml.googlecode.com/svn/trunk@20 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.cpp | 7 ++++--- 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 #include #include @@ -174,7 +173,9 @@ namespace pugi for (; *s; ++s) { - if (*s < 0x80 || (*s >= 0xC0 && *s < 0xFC)) ++length; + unsigned char ch = static_cast(*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 #endif +#include +#include + /// The PugiXML Parser namespace. namespace pugi { -- cgit v1.2.3