Browse Source

Merge pull request #875 from tkarls/return_correct_bool_type_from_map

Changed return type from int32 to bool in function returning a bool
Feng Xiao 10 năm trước cách đây
mục cha
commit
8894d1febf
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/google/protobuf/map.h

+ 1 - 1
src/google/protobuf/map.h

@@ -155,7 +155,7 @@ class LIBPROTOBUF_EXPORT MapKey {
                "MapKey::GetUInt32Value");
                "MapKey::GetUInt32Value");
     return val_.uint32_value_;
     return val_.uint32_value_;
   }
   }
-  int32 GetBoolValue() const {
+  bool GetBoolValue() const {
     TYPE_CHECK(FieldDescriptor::CPPTYPE_BOOL,
     TYPE_CHECK(FieldDescriptor::CPPTYPE_BOOL,
                "MapKey::GetBoolValue");
                "MapKey::GetBoolValue");
     return val_.bool_value_;
     return val_.bool_value_;