Codebase list ignition-transport / af8931f
Fix compilation for protobuf3 Jose Luis Rivero 7 years ago
2 changed file(s) with 42 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Description: update protobuf calls to protobuf3
1 Author: Jose Luis Rivero <jrivero@osrfoundation.org>
2 Forwarded: No
3
4 diff --git a/include/ignition/transport/RepHandler.hh b/include/ignition/transport/RepHandler.hh
5 index f374290..29526f1 100644
6 --- a/include/ignition/transport/RepHandler.hh
7 +++ b/include/ignition/transport/RepHandler.hh
8 @@ -35,6 +35,8 @@
9 #include "ignition/transport/TransportTypes.hh"
10 #include "ignition/transport/Uuid.hh"
11
12 +#include <google/protobuf/stubs/casts.h>
13 +
14 namespace ignition
15 {
16 namespace transport
17 @@ -121,8 +123,8 @@ namespace ignition
18 // Execute the callback (if existing)
19 if (this->cb)
20 {
21 - auto msgReq = google::protobuf::down_cast<const Req*>(&_msgReq);
22 - auto msgRep = google::protobuf::down_cast<Rep*>(&_msgRep);
23 + auto msgReq = google::protobuf::internal::down_cast<const Req*>(&_msgReq);
24 + auto msgRep = google::protobuf::internal::down_cast<Rep*>(&_msgRep);
25
26 this->cb(*msgReq, *msgRep, _result);
27 }
28 diff --git a/include/ignition/transport/SubscriptionHandler.hh b/include/ignition/transport/SubscriptionHandler.hh
29 index a7cad19..8507459 100644
30 --- a/include/ignition/transport/SubscriptionHandler.hh
31 +++ b/include/ignition/transport/SubscriptionHandler.hh
32 @@ -145,7 +145,7 @@ namespace ignition
33 // Execute the callback (if existing)
34 if (this->cb)
35 {
36 - auto msgPtr = google::protobuf::down_cast<const T*>(&_msg);
37 + auto msgPtr = google::protobuf::internal::down_cast<const T*>(&_msg);
38
39 this->cb(*msgPtr);
40 return true;
00 0001-c++11_unconditional
11 0003-respect-cmake-c-flags.patch
22 0004_use_system_gtest.patch
3 0002-fix-protobuf3.patch