mirror of https://github.com/axmolengine/axmol.git
change unsigned long to size_type
This commit is contained in:
parent
7abea5dc58
commit
e7da7b3e42
|
@ -109,13 +109,13 @@ Widget* Helper::seekActionWidgetByActionTag(Widget* root, int tag)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::string Helper::utf8_substr(const std::string& str, unsigned long start, unsigned long length)
|
||||
std::string Helper::utf8_substr(const std::string& str, std::string::size_type start, std::string::size_type length)
|
||||
{
|
||||
if (length==0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
unsigned long c, i, ix, q, min=std::string::npos, max=std::string::npos;
|
||||
std::string::size_type c, i, ix, q, min=std::string::npos, max=std::string::npos;
|
||||
for (q=0, i=0, ix=str.length(); i < ix; i++, q++)
|
||||
{
|
||||
if (q==start)
|
||||
|
|
|
@ -75,8 +75,8 @@ public:
|
|||
* @return a utf8 substring
|
||||
*/
|
||||
static std::string utf8_substr(const std::string& str,
|
||||
unsigned long start,
|
||||
unsigned long length);
|
||||
std::string::size_type start,
|
||||
std::string::size_type length);
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue