File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,7 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")
3838
3939#--------------------------------------
4040# Find Protobuf
41- set (REQ_PROTOBUF_VER 3)
4241ign_find_package (IgnProtobuf
43- VERSION ${REQ_PROTOBUF_VER}
4442 REQUIRED
4543 PRETTY Protobuf )
4644
Original file line number Diff line number Diff line change 2626#pragma warning(pop)
2727#endif
2828
29- #if GOOGLE_PROTOBUF_VERSION > 2999999
29+ #if GOOGLE_PROTOBUF_VERSION > 2999999 && GOOGLE_PROTOBUF_VERSION < 4022000
3030#include < google/protobuf/stubs/casts.h>
3131#endif
3232
@@ -140,7 +140,11 @@ namespace ignition
140140 return false ;
141141 }
142142
143- #if GOOGLE_PROTOBUF_VERSION > 2999999
143+ #if GOOGLE_PROTOBUF_VERSION >= 4022000
144+ auto msgReq =
145+ google::protobuf::internal::DownCast<const Req*>(&_msgReq);
146+ auto msgRep = google::protobuf::internal::DownCast<Rep*>(&_msgRep);
147+ #elif GOOGLE_PROTOBUF_VERSION > 2999999
144148 auto msgReq = google::protobuf::down_cast<const Req*>(&_msgReq);
145149 auto msgRep = google::protobuf::down_cast<Rep*>(&_msgRep);
146150#else
Original file line number Diff line number Diff line change 2828
2929#include < google/protobuf/stubs/common.h>
3030
31- #if GOOGLE_PROTOBUF_VERSION >= 3000000
31+ #if GOOGLE_PROTOBUF_VERSION >= 3000000 && GOOGLE_PROTOBUF_VERSION < 4022000
3232#include < google/protobuf/stubs/casts.h>
3333#endif
3434
@@ -211,7 +211,9 @@ namespace ignition
211211 if (!this ->UpdateThrottling ())
212212 return true ;
213213
214- #if GOOGLE_PROTOBUF_VERSION >= 3000000
214+ #if GOOGLE_PROTOBUF_VERSION >= 4022000
215+ auto msgPtr = google::protobuf::internal::DownCast<const T*>(&_msg);
216+ #elif GOOGLE_PROTOBUF_VERSION >= 3000000
215217 auto msgPtr = google::protobuf::down_cast<const T*>(&_msg);
216218#else
217219 auto msgPtr = google::protobuf::internal::down_cast<const T*>(&_msg);
You can’t perform that action at this time.
0 commit comments