ros2 / examples

Example packages for ROS 2
Apache License 2.0
714 stars 316 forks source link

[Backport] Make member function const #250

Closed nuclearsandwich closed 5 years ago

nuclearsandwich commented 5 years ago

Backports #247 to Dashing, is a repeat of #249 targeting the dashing branch.

sloretz commented 5 years ago

@nuclearsandwich ~DCO check is failing, but I'm not sure this is ABI compatible. While the function was private, since it's used from the constructor and the constructor is defined in the header the compiler could have inlined it. If so, code built against this will fail to find the method since const changes the mangled name.~

Edit: nevermind, this is an example so ABI compatibility doesn't matter

nuclearsandwich commented 5 years ago

@sloretz thanks for the raising the question. The ABI discussion was brought up in #249 and the determination was that because this function definition is in a cpp file it's not part of the public ABI/API