summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAustin Henriksen <austin@zeroc.com>2020-12-16 15:32:24 -0500
committerAustin Henriksen <austin@zeroc.com>2020-12-16 15:32:24 -0500
commit6191749a00b4c9cadffaf0158b27dabbc4f3751f (patch)
treee9586c4e182be3cb36618d7979077fd9e9ccd715 /cpp/src
parentFix bogus call to holdAdapter in ruby timeout test (diff)
downloadice-6191749a00b4c9cadffaf0158b27dabbc4f3751f.tar.bz2
ice-6191749a00b4c9cadffaf0158b27dabbc4f3751f.tar.xz
ice-6191749a00b4c9cadffaf0158b27dabbc4f3751f.zip
UCN literals are now encoded with octals.
And removed the now unnecessary utf-8 compiler flags.
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 94ced867a5c..9832df7e4fa 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -105,10 +105,9 @@ writeConstantValue(IceUtilInternal::Output& out, const TypePtr& type, const Synt
BuiltinPtr bp = BuiltinPtr::dynamicCast(type);
if(bp && bp->kind() == Builtin::KindString)
{
- bool wide = (typeContext & TypeContextUseWstring) || findMetaData(metaData) == "wstring";
- if(wide || cpp11)
+ if ((typeContext & TypeContextUseWstring) || findMetaData(metaData) == "wstring") // wide strings
{
- out << (wide ? "L\"" : "\"");
+ out << "L\"";
out << toStringLiteral(value, "\a\b\f\n\r\t\v", "?", UCN, cpp11 ? 0 : 0x9F + 1);
out << "\"";
}