Revision: 7507
http://winmerge.svn.sourceforge.net/winmerge/?rev=7507&view=rev
Author: gerundt
Date: 2011-01-21 08:42:41 +0000 (Fri, 21 Jan 2011)
Log Message:
-----------
Fixing 64-bit build warnings.
Modified Paths:
--------------
trunk/Src/DirViewColItems.cpp
trunk/Src/paths.cpp
Modified: trunk/Src/DirViewColItems.cpp
===================================================================
--- trunk/Src/DirViewColItems.cpp 2011-01-04 15:53:35 UTC (rev 7506)
+++ trunk/Src/DirViewColItems.cpp 2011-01-21 08:42:41 UTC (rev 7507)
@@ -219,15 +219,15 @@
return s;
}
- int i = 0, j = 0;
+ size_t i = 0, j = 0;
do
{
- int i_ahead = s.find('\\', i);
- int j_ahead = t.find('\\', j);
- int length_s = (i_ahead != String::npos ? i_ahead : s.length()) - i;
- int length_t = (j_ahead != String::npos ? j_ahead : t.length()) - j;
+ size_t i_ahead = s.find('\\', i);
+ size_t j_ahead = t.find('\\', j);
+ size_t length_s = (i_ahead != String::npos ? i_ahead : s.length()) - i;
+ size_t length_t = (j_ahead != String::npos ? j_ahead : t.length()) - j;
if (length_s != length_t ||
- !StrIsIntlEqual(FALSE, s.c_str() + i, t.c_str() + j, length_s))
+ !StrIsIntlEqual(FALSE, s.c_str() + i, t.c_str() + j, (int)length_s))
{
String u(t.c_str() + j, length_t + 1);
u[length_t] = '|';
Modified: trunk/Src/paths.cpp
===================================================================
--- trunk/Src/paths.cpp 2011-01-04 15:53:35 UTC (rev 7506)
+++ trunk/Src/paths.cpp 2011-01-21 08:42:41 UTC (rev 7507)
@@ -38,8 +38,8 @@
*/
bool paths_EndsWithSlash(LPCTSTR s)
{
- if (int len = _tcslen(s))
- return IsSlash(s, len - 1);
+ if (size_t len = _tcslen(s))
+ return IsSlash(s, (int)len - 1);
return false;
}
@@ -101,7 +101,7 @@
*/
void paths_normalize(String & sPath)
{
- int len = sPath.length();
+ size_t len = sPath.length();
if (!len)
return;
@@ -167,7 +167,7 @@
String paths_GetLongPath(LPCTSTR szPath, BOOL bExpandEnvs)
{
String sPath = szPath;
- int len = sPath.length();
+ size_t len = sPath.length();
if (len < 1)
return sPath;
@@ -492,7 +492,7 @@
String paths_GetParentPath(LPCTSTR path)
{
String parentPath(path);
- int len = parentPath.length();
+ size_t len = parentPath.length();
// Remove last '\' from paths
if (parentPath[len - 1] == '\\')
@@ -502,7 +502,7 @@
}
// Remove last part of path
- int pos = parentPath.rfind('\\');
+ size_t pos = parentPath.rfind('\\');
if (pos > -1)
{
@@ -523,7 +523,7 @@
String paths_GetLastSubdir(const String & path)
{
String parentPath(path);
- int len = parentPath.length();
+ size_t len = parentPath.length();
// Remove last '\' from paths
if (parentPath[len - 1] == '\\')
@@ -533,7 +533,7 @@
}
// Find last part of path
- int pos = parentPath.find_last_of('\\');
+ size_t pos = parentPath.find_last_of('\\');
if (pos >= 2)
parentPath.erase(0, pos);
return parentPath;
@@ -549,7 +549,7 @@
if (path.length() < 3)
return FALSE;
- int pos = path.find_last_of('\\');
+ size_t pos = path.find_last_of('\\');
// Absolute path must have "\" and cannot start with it.
// Also "\\blahblah" is invalid.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|