summaryrefslogtreecommitdiff
path: root/source/core/slang-string.h
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-07-06 13:15:26 -0700
committerGitHub <noreply@github.com>2017-07-06 13:15:26 -0700
commitaf8c0eae90c76d2c8f745badf6f743cefe15f777 (patch)
tree57632ee0f4b4944b311c0e50173fbeab0fe7d109 /source/core/slang-string.h
parent21a14cb4e0d578bc4f8a460016269a1199cac0da (diff)
parent9795ed654e7b8daaff0bef1ccae1507ff659d3bd (diff)
Merge pull request #54 from tfoleyNV/falcor-fixes
Fix issues found during testing of v0.4.0 with Falcor
Diffstat (limited to 'source/core/slang-string.h')
-rw-r--r--source/core/slang-string.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h
index 8294d4bc3..3c1b48e8c 100644
--- a/source/core/slang-string.h
+++ b/source/core/slang-string.h
@@ -452,7 +452,7 @@ namespace Slang
return getData();
}
- OSString ToWString(int* len = 0) const;
+ OSString ToWString(UInt* len = 0) const;
bool Equals(const String & str, bool caseSensitive = true)
{
@@ -506,7 +506,7 @@ namespace Slang
String result;
for (auto c : *this)
{
- int d = (c >= 'a' && c <= 'z') ? (c - ('a' - 'A')) : c;
+ char d = (c >= 'a' && c <= 'z') ? (c - ('a' - 'A')) : c;
result.append(d);
}
return result;
@@ -517,7 +517,7 @@ namespace Slang
String result;
for (auto c : *this)
{
- int d = (c >= 'A' && c <= 'Z') ? (c - ('A' - 'a')) : c;
+ char d = (c >= 'A' && c <= 'Z') ? (c - ('A' - 'a')) : c;
result.append(d);
}
return result;
@@ -636,13 +636,13 @@ namespace Slang
class StringBuilder : public String
{
private:
- static const int InitialSize = 1024;
+ enum { InitialSize = 1024 };
public:
- explicit StringBuilder(int bufferSize = InitialSize)
+ explicit StringBuilder(UInt bufferSize = InitialSize)
{
ensureUniqueStorageWithCapacity(bufferSize);
}
- void EnsureCapacity(int size)
+ void EnsureCapacity(UInt size)
{
ensureUniqueStorageWithCapacity(size);
}
@@ -678,7 +678,7 @@ namespace Slang
}
StringBuilder & operator << (const char * str)
{
- Append(str, (int)strlen(str));
+ Append(str, strlen(str));
return *this;
}
StringBuilder & operator << (const String & str)
@@ -736,9 +736,9 @@ namespace Slang
}
void Append(const char * str)
{
- Append(str, (int)strlen(str));
+ Append(str, strlen(str));
}
- void Append(const char * str, int strLen)
+ void Append(const char * str, UInt strLen)
{
append(str, str + strLen);
}