summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-02-13 17:57:16 +0100
committerJose <jose@zeroc.com>2012-02-13 17:57:16 +0100
commitfc053b3896b8aa3929b4203f753cfd87a87bd193 (patch)
tree37bb2534086b2f458407ac2bbb37d8372d083139 /cpp
parent4789 - Make Java build compatible with JDK 7 (diff)
downloadice-fc053b3896b8aa3929b4203f753cfd87a87bd193.tar.bz2
ice-fc053b3896b8aa3929b4203f753cfd87a87bd193.tar.xz
ice-fc053b3896b8aa3929b4203f753cfd87a87bd193.zip
ICE-4590 - map structs that include default values to a class
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/slice2cs/Gen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 4dc6202c511..8ddbc3c6759 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -3166,7 +3166,7 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p)
emitAttributes(p);
emitPartialTypeAttributes();
- if(isValueType(p))
+ if(isValueType(p) && !p->hasDefaultValues())
{
_out << nl << "public partial struct " << name;
}
@@ -3194,7 +3194,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp << nl << "#endregion"; // Slice data members
- bool isClass = !isValueType(p);
+ bool isClass = !isValueType(p) || p->hasDefaultValues();
_out << sp << nl << "#region Constructor";
if(isClass)