diff options
Diffstat (limited to 'src/google/protobuf/compiler/javanano/javanano_field.cc')
-rw-r--r-- | src/google/protobuf/compiler/javanano/javanano_field.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_field.cc b/src/google/protobuf/compiler/javanano/javanano_field.cc index 2c7261f9..5565781c 100644 --- a/src/google/protobuf/compiler/javanano/javanano_field.cc +++ b/src/google/protobuf/compiler/javanano/javanano_field.cc @@ -159,11 +159,13 @@ void SetCommonOneofVariables(const FieldDescriptor* descriptor, (*variables)["oneof_index"] = SimpleItoa(descriptor->containing_oneof()->index()); (*variables)["set_oneof_case"] = - (*variables)["oneof_name"] + "Case_ = " + SimpleItoa(descriptor->number()); + "this." + (*variables)["oneof_name"] + + "Case_ = " + SimpleItoa(descriptor->number()); (*variables)["clear_oneof_case"] = - (*variables)["oneof_name"] + "Case_ = 0"; + "this." + (*variables)["oneof_name"] + "Case_ = 0"; (*variables)["has_oneof_case"] = - (*variables)["oneof_name"] + "Case_ == " + SimpleItoa(descriptor->number()); + "this." + (*variables)["oneof_name"] + "Case_ == " + + SimpleItoa(descriptor->number()); } } // namespace javanano |