File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 26
26
27
27
#include < Eigen/Geometry> // for Isometry3d, Vector3d
28
28
29
+ #include < google/protobuf/stubs/common.h> // for GOOGLE_PROTOBUF_VERSION
29
30
#include < google/protobuf/util/json_util.h> // for JsonPrint
30
31
31
32
#include < cloe/utility/geometry.hpp> // for quaternion_from_rpy
@@ -41,8 +42,10 @@ template <typename OSI_T>
41
42
void osi_to_json (const OSI_T& msg, std::string* json_string) {
42
43
google::protobuf::util::JsonPrintOptions options;
43
44
options.add_whitespace = true ;
45
+ #if GOOGLE_PROTOBUF_VERSION < 5026000
44
46
options.always_print_primitive_fields = true ;
45
- google::protobuf::util::MessageToJsonString (msg, json_string, options);
47
+ #endif
48
+ std::ignore = google::protobuf::util::MessageToJsonString (msg, json_string, options);
46
49
}
47
50
48
51
template void osi_to_json (const osi3::SensorData& msg, std::string* json_string);
You can’t perform that action at this time.
0 commit comments