Resolved 64-bit specific warnings.

This commit is contained in:
Ben Key 2016-04-03 04:19:09 -05:00 committed by BenKeyFSI
parent 50fc53d940
commit 99fd2cf41a
6 changed files with 12 additions and 12 deletions

View file

@ -66,7 +66,7 @@ public:
if(other.precedence_.size() <= precedence_.size()) if(other.precedence_.size() <= precedence_.size())
return false; return false;
for(int i = 0, ie = precedence_.size(); i != ie; ++i) for(size_t i = 0, ie = precedence_.size(); i != ie; ++i)
if(other.precedence_[i] != precedence_[i]) if(other.precedence_[i] != precedence_[i])
return false; return false;
@ -93,8 +93,8 @@ bool operator<(const Precedence& lhs, const Precedence& rhs)
if(lhs.precedence_ == rhs.precedence_) if(lhs.precedence_ == rhs.precedence_)
return false; return false;
int len = (std::min)(lhs.precedence_.size(), rhs.precedence_.size()); size_t len = (std::min)(lhs.precedence_.size(), rhs.precedence_.size());
for(int c = 0; c != len; ++c) for(size_t c = 0; c != len; ++c)
{ {
if(lhs.precedence_[c] < rhs.precedence_[c]) if(lhs.precedence_[c] < rhs.precedence_[c])
return true; return true;

View file

@ -182,7 +182,7 @@ void URI::combinePath(const std::string& relPath)
size_t dots = path_.find("/../", from); size_t dots = path_.find("/../", from);
while(dots != std::string::npos) while(dots != std::string::npos)
{ {
int preceding_slash = (dots > 0) ? path_.rfind(FORWARD_SLASH, dots-1) : 0; size_t preceding_slash = (dots > 0) ? path_.rfind(FORWARD_SLASH, dots-1) : 0;
path_.erase(preceding_slash, dots+3-preceding_slash); path_.erase(preceding_slash, dots+3-preceding_slash);
dots = path_.find("/../", preceding_slash); dots = path_.find("/../", preceding_slash);
} // while } // while

View file

@ -83,7 +83,7 @@ class characterdataappenddata : public DOMTestCase<string_type, string_adaptor>
Node nameNode; Node nameNode;
CharacterData child; CharacterData child;
String childValue; String childValue;
int childLength; size_t childLength;
doc = (Document) baseT::load("staff", true); doc = (Document) baseT::load("staff", true);
elementList = doc.getElementsByTagName(SA::construct_from_utf8("name")); elementList = doc.getElementsByTagName(SA::construct_from_utf8("name"));
nameNode = elementList.item(0); nameNode = elementList.item(0);
@ -91,7 +91,7 @@ class characterdataappenddata : public DOMTestCase<string_type, string_adaptor>
child.appendData(SA::construct_from_utf8(", Esquire")); child.appendData(SA::construct_from_utf8(", Esquire"));
childValue = child.getData(); childValue = child.getData();
childLength = SA::length(childValue); childLength = SA::length(childValue);
baseT::assertEquals(24, childLength, __LINE__, __FILE__); baseT::assertEquals(24, static_cast<int>(childLength), __LINE__, __FILE__);
} }

View file

@ -79,14 +79,14 @@ class characterdatagetlength : public DOMTestCase<string_type, string_adaptor>
Node nameNode; Node nameNode;
CharacterData child; CharacterData child;
String childValue; String childValue;
int childLength; size_t childLength;
doc = (Document) baseT::load("staff", false); doc = (Document) baseT::load("staff", false);
elementList = doc.getElementsByTagName(SA::construct_from_utf8("name")); elementList = doc.getElementsByTagName(SA::construct_from_utf8("name"));
nameNode = elementList.item(0); nameNode = elementList.item(0);
child = (CharacterData) nameNode.getFirstChild(); child = (CharacterData) nameNode.getFirstChild();
childValue = child.getData(); childValue = child.getData();
childLength = SA::length(childValue); childLength = SA::length(childValue);
baseT::assertEquals(15, childLength, __LINE__, __FILE__); baseT::assertEquals(15, static_cast<int>(childLength), __LINE__, __FILE__);
} }

View file

@ -82,7 +82,7 @@ class hc_characterdataappenddata : public DOMTestCase<string_type, string_adapto
Node nameNode; Node nameNode;
CharacterData child; CharacterData child;
String childValue; String childValue;
int childLength; size_t childLength;
doc = (Document) baseT::load("hc_staff", true); doc = (Document) baseT::load("hc_staff", true);
elementList = doc.getElementsByTagName(SA::construct_from_utf8("strong")); elementList = doc.getElementsByTagName(SA::construct_from_utf8("strong"));
nameNode = elementList.item(0); nameNode = elementList.item(0);
@ -90,7 +90,7 @@ class hc_characterdataappenddata : public DOMTestCase<string_type, string_adapto
child.appendData(SA::construct_from_utf8(", Esquire")); child.appendData(SA::construct_from_utf8(", Esquire"));
childValue = child.getData(); childValue = child.getData();
childLength = SA::length(childValue); childLength = SA::length(childValue);
baseT::assertEquals(24, childLength, __LINE__, __FILE__); baseT::assertEquals(24, static_cast<int>(childLength), __LINE__, __FILE__);
} }

View file

@ -78,14 +78,14 @@ class hc_characterdatagetlength : public DOMTestCase<string_type, string_adaptor
Node nameNode; Node nameNode;
CharacterData child; CharacterData child;
String childValue; String childValue;
int childLength; size_t childLength;
doc = (Document) baseT::load("hc_staff", false); doc = (Document) baseT::load("hc_staff", false);
elementList = doc.getElementsByTagName(SA::construct_from_utf8("strong")); elementList = doc.getElementsByTagName(SA::construct_from_utf8("strong"));
nameNode = elementList.item(0); nameNode = elementList.item(0);
child = (CharacterData) nameNode.getFirstChild(); child = (CharacterData) nameNode.getFirstChild();
childValue = child.getData(); childValue = child.getData();
childLength = SA::length(childValue); childLength = SA::length(childValue);
baseT::assertEquals(15, childLength, __LINE__, __FILE__); baseT::assertEquals(15, static_cast<int>(childLength), __LINE__, __FILE__);
} }