summaryrefslogtreecommitdiffstats
path: root/source/core/slang-string.h
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-07-06 12:58:23 -0700
committerTim Foley <tfoley@nvidia.com>2017-07-06 12:58:23 -0700
commit9795ed654e7b8daaff0bef1ccae1507ff659d3bd (patch)
tree57632ee0f4b4944b311c0e50173fbeab0fe7d109 /source/core/slang-string.h
parent098a5442caeb2e9505864e985900d4793014dffc (diff)
Fix bug in `String::To{Upper|Lower}`
These were accidentally calling the version of `String::append()` that takes an `int` and prints its decimal value, rather than the version that takes a `char` and appends the corresponding ASCII character.
Diffstat (limited to 'source/core/slang-string.h')
-rw-r--r--source/core/slang-string.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h
index ba68e405e..3c1b48e8c 100644
--- a/source/core/slang-string.h
+++ b/source/core/slang-string.h
@@ -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;