diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-10-12 17:10:39 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-10-12 17:10:39 +0200 |
commit | 3a55ebb51b8914b60d308a0535d9abf97567138d (patch) | |
tree | 7539781f29da04b1e33ca77ada31d326faaadd7c /cpp | |
parent | ICE-8378 - cloneWithPrefix cause System.IO.IOException: with IceBox and Ice.F... (diff) | |
download | ice-3.7.0-xcode9.tar.bz2 ice-3.7.0-xcode9.tar.xz ice-3.7.0-xcode9.zip |
Fixed generated code warnings showing up with Objective-C and Xcode 9.0 (ICE-8540)v3.7.0-xcode9
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/slice2objc/Gen.cpp | 4 | ||||
-rw-r--r-- | cpp/src/slice2objc/ObjCUtil.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp index c2ff2e2bca9..1c4b7e58943 100644 --- a/cpp/src/slice2objc/Gen.cpp +++ b/cpp/src/slice2objc/Gen.cpp @@ -449,7 +449,7 @@ Slice::ObjCVisitor::getParams(const OperationPtr& op, bool internal) const string typeString; if((*q)->isOutParam()) { - typeString = outTypeToString(type, (*q)->optional(), false, true); + typeString = outTypeToString(type, (*q)->optional(), true, true); } else { @@ -524,7 +524,7 @@ Slice::ObjCVisitor::getUnmarshalParams(const OperationPtr& op, bool internal) co { result += " " + getParamId(*q); } - result += ":(" + outTypeToString(type, (*q)->optional(), false, true) + ")" + getParamName(*q, internal); + result += ":(" + outTypeToString(type, (*q)->optional(), true, true) + ")" + getParamName(*q, internal); } } return result; diff --git a/cpp/src/slice2objc/ObjCUtil.cpp b/cpp/src/slice2objc/ObjCUtil.cpp index 253519c837a..d5bf0e6d9c3 100644 --- a/cpp/src/slice2objc/ObjCUtil.cpp +++ b/cpp/src/slice2objc/ObjCUtil.cpp @@ -406,7 +406,7 @@ Slice::ObjCGenerator::outTypeToString(const TypePtr& type, bool optional, bool a s += "*"; } } - if(autoreleasing && !isValueType(type)) + if(autoreleasing && (!isValueType(type) || optional)) { s += " ICE_AUTORELEASING_QUALIFIER"; } |