Skip to content

Commit

Permalink
upgrade protobuf version
Browse files Browse the repository at this point in the history
  • Loading branch information
huangminghuang committed Jan 27, 2024
1 parent eb6ff6e commit b45217b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED On)
CPMAddPackage(
NAME protobuf
VERSION 24.2
VERSION 25.2
GITHUB_REPOSITORY protocolbuffers/protobuf
OPTIONS "ABSL_PROPAGATE_CXX_STD ON"
"protobuf_INSTALL OFF"
Expand Down
5 changes: 3 additions & 2 deletions tests/non_owning_proto2_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ inline void SetDefaultFields(protobuf_unittest::TestAllTypes *message) {
// ------------------------------------------------------------------
inline void SetOneofFields(protobuf_unittest::TestAllTypes *message) {
message->oneof_field = 601U;
message->oneof_field = protobuf_unittest::TestAllTypes::NestedMessage{.bb = 602};
message->oneof_field = "603";
using enum protobuf_unittest::TestAllTypes::oneof_field_oneof_case;
message->oneof_field.emplace<static_cast<int>(oneof_nested_message)>( protobuf_unittest::TestAllTypes::NestedMessage{.bb = 602});
message->oneof_field.emplace<static_cast<int>(oneof_string)>("603");
message->oneof_field = "604"_bytes_view;
}

Expand Down
5 changes: 3 additions & 2 deletions tests/unittest_proto2_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@ inline void ModifyRepeatedFields(protobuf_unittest::TestAllTypes *message) {
// ------------------------------------------------------------------
inline void SetOneofFields(protobuf_unittest::TestAllTypes *message) {
message->oneof_field = 601U;
message->oneof_field = protobuf_unittest::TestAllTypes::NestedMessage{.bb = 602};
message->oneof_field = "603";
using enum protobuf_unittest::TestAllTypes::oneof_field_oneof_case;
message->oneof_field.emplace<static_cast<int>(oneof_nested_message)>( protobuf_unittest::TestAllTypes::NestedMessage{.bb = 602});
message->oneof_field.emplace<static_cast<int>(oneof_string)>("603");
message->oneof_field = "604"_bytes;
}

Expand Down

0 comments on commit b45217b

Please sign in to comment.