Fix some 64-bit type conversion warnings.

This commit is contained in:
Unknown W. Brackets committed 2013-01-19 13:48:20 -08:00
1 parent f53ec2bef6
commit 140fd171ef
17 files changed
+58 -60

No files matched your search

+4 -4
View File
@@ -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;