Repository navigation
Use const and/or references for string arguments in RViz plugin where appropriate - #9
Merged
Merged
Conversation
scastro-nasa
commented
Jun 12, 2026
scastro-nasa
commented
Jun 12, 2026
Comment on lines
215
to
+225
| @@ -222,7 +221,8 @@ void BehaviorTreeWidget::update_bt_text() | |||
| { | |||
| bt_print_text += "<br/>"; | |||
| } | |||
| bt_print_text += process_text(bt_data); | |||
| process_text(bt_data); | |||
| bt_print_text += bt_data; | |||
Contributor
Author
There was a problem hiding this comment.
it's better to eat the copy in the range-based for-loop than in all calls to process_text (and its internal multiple calls to replace_string ... I think.
scastro-nasa
force-pushed
the
scastro/const-ref
branch
from
June 12, 2026 14:42
02cfe16 to
a44ec9e
Compare
msavchen-nasa
approved these changes
Jun 12, 2026
msavchen-nasa
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
Side note Nathan said that there was a better way to do process_text but I havent had time to look into.
@scastro-nasa do you have any ideas?
Contributor
Author
I do! I think you can pre-define the list of all replacements and do them with |
msavchen-nasa
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requires NASA-JSC-Robotics/color_tools#8 to go in first
Tested on behavior demos in
clr_wsand still works!