svg_loader XMLParser: Clean up parameter type

size_t to unsigned int
This commit is contained in:
JunsuChoi 2021-10-21 13:13:23 +09:00 committed by Hermet Park
parent e5196d610d
commit 1b675adca4
2 changed files with 3 additions and 3 deletions

View file

@ -414,7 +414,7 @@ bool simpleXmlParse(const char* buf, unsigned bufLength, bool strip, simpleXMLCb
end = _unskipWhiteSpacesAndXmlEntities(end, start);
}
if (!func((void*)data, type, start, (size_t)(end - start))) return false;
if (!func((void*)data, type, start, (unsigned int)(end - start))) return false;
itr = p + 1;
} else {
@ -427,7 +427,7 @@ bool simpleXmlParse(const char* buf, unsigned bufLength, bool strip, simpleXMLCb
p = itr;
p = _skipWhiteSpacesAndXmlEntities(p, itrEnd);
if (p) {
if (!func((void*)data, SimpleXMLType::Ignored, itr, (size_t)(p - itr))) return false;
if (!func((void*)data, SimpleXMLType::Ignored, itr, (unsigned int)(p - itr))) return false;
itr = p;
}
}

View file

@ -44,7 +44,7 @@ enum class SimpleXMLType
DoctypeChild //!< \<!doctype_child
};
typedef bool (*simpleXMLCb)(void* data, SimpleXMLType type, const char* content, unsigned length);
typedef bool (*simpleXMLCb)(void* data, SimpleXMLType type, const char* content, unsigned int length);
typedef bool (*simpleXMLAttributeCb)(void* data, const char* key, const char* value);
bool simpleXmlParseAttributes(const char* buf, unsigned buflen, simpleXMLAttributeCb func, const void* data);