summaryrefslogtreecommitdiffstats
path: root/source/core/slang-io.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-07-06 11:11:01 -0700
committerTim Foley <tfoley@nvidia.com>2017-07-06 11:18:09 -0700
commit03de737f0d18526b99b59a1810c7e290b66f4be2 (patch)
treed0e75b2524d9b7e666de0ca9fa13f3a086bf02dc /source/core/slang-io.cpp
parent21a14cb4e0d578bc4f8a460016269a1199cac0da (diff)
Fix many warnings-as-errors issues.
The code should now compile cleanly with warnings as errors for VS2015 with `W3`. Most of the changes had to do with propagating a real pointer-sized integer type through code that had been using `int`.
Diffstat (limited to 'source/core/slang-io.cpp')
-rw-r--r--source/core/slang-io.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/core/slang-io.cpp b/source/core/slang-io.cpp
index 684fed0a1..24d5aa412 100644
--- a/source/core/slang-io.cpp
+++ b/source/core/slang-io.cpp
@@ -23,7 +23,7 @@ namespace Slang
String Path::TruncateExt(const String & path)
{
- int dotPos = path.LastIndexOf('.');
+ UInt dotPos = path.LastIndexOf('.');
if (dotPos != -1)
return path.SubString(0, dotPos);
else
@@ -32,7 +32,7 @@ namespace Slang
String Path::ReplaceExt(const String & path, const char * newExt)
{
StringBuilder sb(path.Length()+10);
- int dotPos = path.LastIndexOf('.');
+ UInt dotPos = path.LastIndexOf('.');
if (dotPos == -1)
dotPos = path.Length();
sb.Append(path.Buffer(), dotPos);
@@ -72,7 +72,7 @@ namespace Slang
String Path::GetFileNameWithoutEXT(const String & path)
{
String fileName = GetFileName(path);
- int dotPos = fileName.LastIndexOf('.');
+ UInt dotPos = fileName.LastIndexOf('.');
if (dotPos == -1)
return fileName;
return fileName.SubString(0, dotPos);