Skip to content

Commit

Permalink
Minor fix in generated move constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
brunexgeek committed Jun 28, 2019
1 parent 5ecfe86 commit 417ee6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/cpp/cppgen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static void generateMoveCtor( GeneratorContext &ctx, const Message &message )
"$1$($1$ &&that) {\n\t", message.name);
for (auto fi = message.fields.begin(); fi != message.fields.end(); ++fi)
{
if (fi->type.id == TYPE_MESSAGE || fi->type.repeated || fi->type.id == TYPE_STRING)
if (fi->type.id == TYPE_MESSAGE || fi->type.repeated || fi->type.id == protogen::TYPE_BYTES || fi->type.id == TYPE_STRING)
ctx.printer("this->$1$.swap(that.$1$);\n", fieldStorage(*fi));
else
ctx.printer("this->$1$ = that.$1$;\n", fieldStorage(*fi));
Expand Down

0 comments on commit 417ee6b

Please sign in to comment.