mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-27 12:18:35 +01:00
Fix some 64-bit type conversion warnings.
This commit is contained in:
1 parent
f53ec2bef6
commit
140fd171ef
17 files changed
+58
-60
No files matched your search
@@ -250,8 +250,8 @@ std::string ReplaceAll(std::string result, const std::string& src, const std::st
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
const int pos = result.find(src);
|
||||
if (pos == -1) break;
|
||||
const size_t pos = result.find(src);
|
||||
if (pos == result.npos) break;
|
||||
result.replace(pos, src.size(), dest);
|
||||
}
|
||||
return result;
|
||||
@@ -297,7 +297,7 @@ std::string UriDecode(const std::string & sSrc)
|
||||
// for future extension"
|
||||
|
||||
const unsigned char * pSrc = (const unsigned char *)sSrc.c_str();
|
||||
const int SRC_LEN = sSrc.length();
|
||||
const size_t SRC_LEN = sSrc.length();
|
||||
const unsigned char * const SRC_END = pSrc + SRC_LEN;
|
||||
const unsigned char * const SRC_LAST_DEC = SRC_END - 2; // last decodable '%'
|
||||
|
||||
@@ -359,7 +359,7 @@ std::string UriEncode(const std::string & sSrc)
|
||||
{
|
||||
const char DEC2HEX[16 + 1] = "0123456789ABCDEF";
|
||||
const unsigned char * pSrc = (const unsigned char *)sSrc.c_str();
|
||||
const int SRC_LEN = sSrc.length();
|
||||
const size_t SRC_LEN = sSrc.length();
|
||||
unsigned char * const pStart = new unsigned char[SRC_LEN * 3];
|
||||
unsigned char * pEnd = pStart;
|
||||
const unsigned char * const SRC_END = pSrc + SRC_LEN;
|
||||
|
||||
Reference in new issue
Block a user