From 2b551bf37e0f9965e2016e2522af6afde90f27ab Mon Sep 17 00:00:00 2001 From: Kerstin Keller Date: Thu, 3 Aug 2023 19:54:34 +0200 Subject: [PATCH] Samples: Make compatible with Protobuf >= 3.22.0 --- samples/cpp/services/ping_client_dyn/src/proto_json_conv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/cpp/services/ping_client_dyn/src/proto_json_conv.cpp b/samples/cpp/services/ping_client_dyn/src/proto_json_conv.cpp index de61d7128f..cb30e109ae 100644 --- a/samples/cpp/services/ping_client_dyn/src/proto_json_conv.cpp +++ b/samples/cpp/services/ping_client_dyn/src/proto_json_conv.cpp @@ -33,7 +33,7 @@ std::string GetSerialzedMessageFromJSON(google::protobuf::Message* msg_proto_, c } // read JSON string into message object - google::protobuf::util::Status status = google::protobuf::util::JsonStringToMessage(msg_json_, msg_proto_); + auto status = google::protobuf::util::JsonStringToMessage(msg_json_, msg_proto_); if (!status.ok()) { std::cerr << "Could not convert JSON to google message." << std::endl; @@ -60,7 +60,7 @@ std::string GetJSONFromSerialzedMessage(google::protobuf::Message* msg_proto_, c // convert message object to JSON string std::string msg_json; - google::protobuf::util::Status status = google::protobuf::util::MessageToJsonString(*msg_proto_, &msg_json); + auto status = google::protobuf::util::MessageToJsonString(*msg_proto_, &msg_json); if (!status.ok()) { std::cerr << "Could not convert google message to JSON." << std::endl;