fix a couple of implicit signed/unsigned conversions
This commit is contained in:
@@ -68,18 +68,18 @@ inline unsigned parseDuration(const std::string &s)
|
||||
{
|
||||
if (1 == result.size())
|
||||
{
|
||||
minutes = stringToInt(result[0]);
|
||||
minutes = StringToUint(result[0]);
|
||||
}
|
||||
if (2 == result.size())
|
||||
{
|
||||
minutes = stringToInt(result[1]);
|
||||
hours = stringToInt(result[0]);
|
||||
minutes = StringToUint(result[1]);
|
||||
hours = StringToUint(result[0]);
|
||||
}
|
||||
if (3 == result.size())
|
||||
{
|
||||
seconds = stringToInt(result[2]);
|
||||
minutes = stringToInt(result[1]);
|
||||
hours = stringToInt(result[0]);
|
||||
seconds = StringToUint(result[2]);
|
||||
minutes = StringToUint(result[1]);
|
||||
hours = StringToUint(result[0]);
|
||||
}
|
||||
return 10 * (3600 * hours + 60 * minutes + seconds);
|
||||
}
|
||||
|
||||
@@ -165,17 +165,17 @@ InputRestrictionContainer XMLParser::ReadXMLRestriction()
|
||||
if (xmlStrEqual(role, (const xmlChar *)"to") &&
|
||||
xmlStrEqual(type, (const xmlChar *)"way"))
|
||||
{
|
||||
restriction.toWay = stringToUint((const char *)ref);
|
||||
restriction.toWay = StringToUint((const char *)ref);
|
||||
}
|
||||
if (xmlStrEqual(role, (const xmlChar *)"from") &&
|
||||
xmlStrEqual(type, (const xmlChar *)"way"))
|
||||
{
|
||||
restriction.fromWay = stringToUint((const char *)ref);
|
||||
restriction.fromWay = StringToUint((const char *)ref);
|
||||
}
|
||||
if (xmlStrEqual(role, (const xmlChar *)"via") &&
|
||||
xmlStrEqual(type, (const xmlChar *)"node"))
|
||||
{
|
||||
restriction.restriction.viaNode = stringToUint((const char *)ref);
|
||||
restriction.restriction.viaNode = StringToUint((const char *)ref);
|
||||
}
|
||||
|
||||
if (NULL != type)
|
||||
@@ -229,7 +229,7 @@ ExtractionWay XMLParser::ReadXMLWay()
|
||||
xmlStrEqual(child_name, (const xmlChar *)"way") == 1)
|
||||
{
|
||||
xmlChar *id = xmlTextReaderGetAttribute(inputReader, (const xmlChar *)"id");
|
||||
way.id = stringToUint((char *)id);
|
||||
way.id = StringToUint((char *)id);
|
||||
xmlFree(id);
|
||||
xmlFree(child_name);
|
||||
break;
|
||||
@@ -263,7 +263,7 @@ ExtractionWay XMLParser::ReadXMLWay()
|
||||
xmlChar *ref = xmlTextReaderGetAttribute(inputReader, (const xmlChar *)"ref");
|
||||
if (ref != NULL)
|
||||
{
|
||||
way.path.push_back(stringToUint((const char *)ref));
|
||||
way.path.push_back(StringToUint((const char *)ref));
|
||||
xmlFree(ref);
|
||||
}
|
||||
}
|
||||
@@ -291,7 +291,7 @@ ImportNode XMLParser::ReadXMLNode()
|
||||
attribute = xmlTextReaderGetAttribute(inputReader, (const xmlChar *)"id");
|
||||
if (attribute != NULL)
|
||||
{
|
||||
node.node_id = stringToUint((const char *)attribute);
|
||||
node.node_id = StringToUint((const char *)attribute);
|
||||
xmlFree(attribute);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user