diff options
author | Michi Henning <michi@zeroc.com> | 2009-02-17 18:06:49 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2009-02-17 18:06:49 +1000 |
commit | 5fd71cf1571afda5043fbb441d6537e78d87a08c (patch) | |
tree | 54e373677ec070e4db21846fcc1e85b2b35025e3 /cpp/src/slice2cs/Gen.cpp | |
parent | Bug 3715 - filterMcppWarnings not handle all cases (diff) | |
download | ice-5fd71cf1571afda5043fbb441d6537e78d87a08c.tar.bz2 ice-5fd71cf1571afda5043fbb441d6537e78d87a08c.tar.xz ice-5fd71cf1571afda5043fbb441d6537e78d87a08c.zip |
Bug 3668 - C# translator generates bogus code for metadata.
Diffstat (limited to 'cpp/src/slice2cs/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cs/Gen.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index a2420094869..e6e7748513b 100644 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -2677,8 +2677,6 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) emitDeprecate(p, cont, _out, "member"); - emitAttributes(p); - string type = typeToString(p->type()); string propertyName = fixId(p->name(), baseTypes, isClass); string dataMemberName = propertyName; @@ -2687,18 +2685,19 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) dataMemberName += "_prop"; } - _out << nl; if(propertyMapping) { - _out << "private"; + _out << nl << "private"; } else if(isProtected) { - _out << "protected"; + emitAttributes(p); + _out << nl << "protected"; } else { - _out << "public"; + emitAttributes(p); + _out << nl << "public"; } _out << ' ' << type << ' ' << dataMemberName << ';'; @@ -2707,6 +2706,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) return; } + emitAttributes(p); _out << nl << (isProtected ? "protected" : "public"); if(!isValue) { |