mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15747 from mogemimi/fix-c4267-warning
Fix C4267 and C4309 warnings when compiling for Windows 10 UWP
This commit is contained in:
commit
15dc938f1f
|
@ -108,7 +108,7 @@ namespace cocos2d { namespace network {
|
|||
do
|
||||
{
|
||||
string dir;
|
||||
unsigned long found = _tempFileName.find_last_of("/\\");
|
||||
size_t found = _tempFileName.find_last_of("/\\");
|
||||
if (found == string::npos)
|
||||
{
|
||||
_errCode = DownloadTask::ERROR_INVALID_PARAMS;
|
||||
|
|
|
@ -36,8 +36,8 @@ static std::string s_pszResourcePath;
|
|||
static inline std::string convertPathFormatToUnixStyle(const std::string& path)
|
||||
{
|
||||
std::string ret = path;
|
||||
int len = ret.length();
|
||||
for (int i = 0; i < len; ++i)
|
||||
size_t len = ret.length();
|
||||
for (size_t i = 0; i < len; ++i)
|
||||
{
|
||||
if (ret[i] == '\\')
|
||||
{
|
||||
|
|
|
@ -321,8 +321,7 @@ Concurrency::task<Platform::Array<byte>^> ReadDataAsync(Platform::String^ path)
|
|||
std::string computeHashForFile(const std::string& filePath)
|
||||
{
|
||||
std::string ret = filePath;
|
||||
int pos = std::string::npos;
|
||||
pos = ret.find_last_of('/');
|
||||
size_t pos = ret.find_last_of('/');
|
||||
|
||||
if (pos != std::string::npos) {
|
||||
ret = ret.substr(pos);
|
||||
|
|
Loading…
Reference in New Issue