diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-07-06 11:11:01 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-07-06 11:18:09 -0700 |
| commit | 03de737f0d18526b99b59a1810c7e290b66f4be2 (patch) | |
| tree | d0e75b2524d9b7e666de0ca9fa13f3a086bf02dc /source/core/slang-string.h | |
| parent | 21a14cb4e0d578bc4f8a460016269a1199cac0da (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-string.h')
| -rw-r--r-- | source/core/slang-string.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h index 8294d4bc3..ba68e405e 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) { @@ -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); } |
