Package: kido / 0.1.0+dfsg-2

0004-fix-tinyxml-constant.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Description: Use new tinyxml constant
Origin: https://github.com/dartsim/dart/pull/750
Applied-Upstream: 2841967fc6628c9aea58c93227b28abdf5dfbcc2

diff --git a/kido/utils/XmlHelpers.cpp b/kido/utils/XmlHelpers.cpp
index 6de40bd..22b8641 100644
--- a/kido/utils/XmlHelpers.cpp
+++ b/kido/utils/XmlHelpers.cpp
@@ -731,7 +731,7 @@ bool getAttributeBool(const tinyxml2::XMLElement* element,
   const int result = element->QueryBoolAttribute(attributeName.c_str(),
                                                  &val);
 
-  if (result != tinyxml2::XML_NO_ERROR)
+  if (result != tinyxml2::XML_SUCCESS)
   {
     dtwarn << "[getAttribute] Error in parsing bool type attribute ["
            << attributeName << "] of an element [" << element->Name()
@@ -749,7 +749,7 @@ int getAttributeInt(const tinyxml2::XMLElement* element,
   int val = 0;
   const int result = element->QueryIntAttribute(attributeName.c_str(), &val);
 
-  if (result != tinyxml2::XML_NO_ERROR)
+  if (result != tinyxml2::XML_SUCCESS)
   {
     dtwarn << "[getAttribute] Error in parsing int type attribute ["
            << attributeName << "] of an element [" << element->Name()
@@ -768,7 +768,7 @@ unsigned int getAttributeUInt(const tinyxml2::XMLElement* element,
   const int result = element->QueryUnsignedAttribute(attributeName.c_str(),
                                                      &val);
 
-  if (result != tinyxml2::XML_NO_ERROR)
+  if (result != tinyxml2::XML_SUCCESS)
   {
     dtwarn << "[getAttribute] Error in parsing unsiged int type attribute ["
            << attributeName << "] of an element [" << element->Name()
@@ -787,7 +787,7 @@ float getAttributeFloat(const tinyxml2::XMLElement* element,
   const int result = element->QueryFloatAttribute(attributeName.c_str(),
                                                   &val);
 
-  if (result != tinyxml2::XML_NO_ERROR)
+  if (result != tinyxml2::XML_SUCCESS)
   {
     dtwarn << "[getAttribute] Error in parsing float type attribute ["
            << attributeName << "] of an element [" << element->Name()
@@ -806,7 +806,7 @@ double getAttributeDouble(const tinyxml2::XMLElement* element,
   const int result = element->QueryDoubleAttribute(attributeName.c_str(),
                                                    &val);
 
-  if (result != tinyxml2::XML_NO_ERROR)
+  if (result != tinyxml2::XML_SUCCESS)
   {
     dtwarn << "[getAttribute] Error in parsing double type attribute ["
            << attributeName << "] of an element [" << element->Name()