diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 809c03f943a..967a1c78556 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2698,7 +2698,7 @@ Slice::Gen::ObjectVisitor::emitGCInsertCode(const TypePtr& p, const string& name C << nl << "for(" << scoped << "::const_iterator " << iterName << " = " << name << ".begin(); " << iterName << " != " << name << ".end(); ++" << iterName << ")"; C << sb; - emitGCInsertCode(d->valueType(), string("(*") + iterName + ")", "", ++level); + emitGCInsertCode(d->valueType(), string("(*") + iterName + ").second", "", ++level); C << eb; C << eb; return; @@ -2758,7 +2758,7 @@ Slice::Gen::ObjectVisitor::emitGCClearCode(const TypePtr& p, const string& name, C << nl << "for(" << scoped << "::iterator " << iterName << " = " << name << ".begin(); " << iterName << " != " << name << ".end(); ++" << iterName << ")"; C << sb; - emitGCClearCode(d->valueType(), string("(*") + iterName + ")", "", ++level); + emitGCClearCode(d->valueType(), string("(*") + iterName + ").second", "", ++level); C << eb; C << eb; return; |