Repository navigation
Compile flag fixes - #530
jpsamper2009 wants to merge 2 commits into
Conversation
| } // namespace node_interfaces | ||
|
|
||
| class ClientBase | ||
| class RCLCPP_PUBLIC ClientBase |
There was a problem hiding this comment.
Could you explain a little bit about what this improves? I don't have any particular knowledge, so a little description of why making the class public instead of the methods would be helpful for me to understand.
|
|
||
| if (abs_scale > 1.0 && abs_dns > static_cast<uint64_t>(max / abs_scale)) { | ||
| if ((dns > 0 && scale > 0) || (dns < 0 && scale < 0)) { | ||
| long double max_ld = static_cast<long double>(max); |
There was a problem hiding this comment.
Do we actually need the extra precision of a long double here? I'm particularly worried that this will have a performance impact because this will probably end up calling software long double routines. Further, we already know that (in the one and only caller to this), that max is going to be std::numeric_limites<rcl_duration_value_t>::max(), so probably INT64_MAX, which I don't think we need to store in a long double. I haven't fully thought through all of the implications here, so I'm glad to hear arguments about why a long double would be needed.
| throw std::runtime_error( | ||
| std::string("Failed to set SIGINT signal handler: (" + std::to_string(errno) + ")") + | ||
| error_string); | ||
| std::string error_message("Failed to set SIGINT signal handler: ("); |
There was a problem hiding this comment.
Any particular reason for this change?
|
|
||
| std::vector<std::string> return_arguments; | ||
| return_arguments.resize(nonros_argc); | ||
| return_arguments.resize(static_cast<uint32_t>(nonros_argc)); |
There was a problem hiding this comment.
I think this should probably be a static_cast<size_t>, given https://en.cppreference.com/w/cpp/container/vector/resize, no?
| return_arguments.resize(static_cast<uint32_t>(nonros_argc)); | ||
|
|
||
| for (int ii = 0; ii < nonros_argc; ++ii) { | ||
| for (uint32_t ii = 0U; ii < static_cast<uint32_t>(nonros_argc); ++ii) { |
There was a problem hiding this comment.
If we are casting nonros_argc to a number twice, we should probably just store it above and reuse it rather than continually casting. This may also change to size_t based on the previous comment.
|
This PR was a for a much older version of the code. I'll close it and readdress with a newer version (if the issues still exist). |
I'm actually closing this for now. @jpsamper2009 feel free to reopen if you disagree. |
) Signed-off-by: Michel Hidalgo <[email protected]>
…os2#530) * Fixes ros2#464 - caches by message size and not message count Signed-off-by: Jaison Titus <[email protected]>
Description
connects to ros2/rcutils#114