dmuratshin 10 years ago
parent
commit
7e1a248643
3 changed files with 24 additions and 1 deletions
  1. 21 0
      oxygine/src/pugixml/pugixml.cpp
  2. 2 0
      oxygine/src/pugixml/pugixml.hpp
  3. 1 1
      oxygine/src/res/Resources.h

+ 21 - 0
oxygine/src/pugixml/pugixml.cpp

@@ -12457,6 +12457,27 @@ namespace pugi
 	{
 	{
 		return query.evaluate_node(*this);
 		return query.evaluate_node(*this);
 	}
 	}
+	
+	pugi::xml_attribute find_next_attribute(const pugi::xml_node &node, pugi::xml_attribute& attr, const char *name)
+	{
+		pugi::xml_attribute current = attr;
+
+		while (!current.empty())
+		{
+			if (!strcmp(current.name(), name))
+			{
+				attr = current.next_attribute();
+				return current;
+			}
+			current = current.next_attribute();
+		}
+
+		current = node.attribute(name);
+		if (!current.empty())
+			attr = current;
+
+		return current;
+	}
 }
 }
 
 
 #endif
 #endif

+ 2 - 0
oxygine/src/pugixml/pugixml.hpp

@@ -1344,6 +1344,8 @@ namespace pugi
 	std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >& str);
 	std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >& str);
 #endif
 #endif
 
 
+	pugi::xml_attribute PUGIXML_FUNCTION find_next_attribute(const pugi::xml_node &node, pugi::xml_attribute& attr, const char *name);
+
 	// Memory allocation function interface; returns pointer to allocated memory or NULL on failure
 	// Memory allocation function interface; returns pointer to allocated memory or NULL on failure
 	typedef void* (*allocation_function)(size_t size);
 	typedef void* (*allocation_function)(size_t size);
 
 

+ 1 - 1
oxygine/src/res/Resources.h

@@ -129,9 +129,9 @@ namespace oxygine
 
 
 
 
         resources _resources;
         resources _resources;
-        //resources _owned;
         resources _fastAccessResources;
         resources _fastAccessResources;
 
 
+
         typedef std::vector< registeredResource > registeredResources;
         typedef std::vector< registeredResource > registeredResources;
         static registeredResources _registeredResources;
         static registeredResources _registeredResources;