-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[20283] Return const reference in get_log_resources #4271
Merged
Merged
Conversation
This file contains 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
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
@Mergifyio backport 2.12.x 2.11.x 2.10.x 2.6.x |
✅ Backports have been created
|
JesusPoderoso
previously approved these changes
Jan 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with green CI
@richiprosima please test windows please test mac |
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
@richiprosima please test this |
@richiprosima please test mac |
JesusPoderoso
approved these changes
Jan 24, 2024
JesusPoderoso
added
ready-to-merge
Ready to be merged. CI and changes have been reviewed and approved.
and removed
ci-pending
PR which CI is running
labels
Jan 24, 2024
mergify bot
pushed a commit
that referenced
this pull request
Jan 27, 2024
* Refs #20283: get_log_resources returns a const ref Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20283: Apply change to internal header Signed-off-by: EduPonz <eduardoponz@eprosima.com> --------- Signed-off-by: EduPonz <eduardoponz@eprosima.com> (cherry picked from commit 06c8695)
mergify bot
pushed a commit
that referenced
this pull request
Jan 27, 2024
* Refs #20283: get_log_resources returns a const ref Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20283: Apply change to internal header Signed-off-by: EduPonz <eduardoponz@eprosima.com> --------- Signed-off-by: EduPonz <eduardoponz@eprosima.com> (cherry picked from commit 06c8695)
mergify bot
pushed a commit
that referenced
this pull request
Jan 27, 2024
* Refs #20283: get_log_resources returns a const ref Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20283: Apply change to internal header Signed-off-by: EduPonz <eduardoponz@eprosima.com> --------- Signed-off-by: EduPonz <eduardoponz@eprosima.com> (cherry picked from commit 06c8695)
This was referenced Jan 27, 2024
mergify bot
pushed a commit
that referenced
this pull request
Jan 27, 2024
* Refs #20283: get_log_resources returns a const ref Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20283: Apply change to internal header Signed-off-by: EduPonz <eduardoponz@eprosima.com> --------- Signed-off-by: EduPonz <eduardoponz@eprosima.com> (cherry picked from commit 06c8695) # Conflicts: # include/fastrtps/rtps/network/NetworkFactory.h # src/cpp/fastdds/log/Log.cpp
EduPonz
added a commit
that referenced
this pull request
Feb 1, 2024
* Refs #20283: get_log_resources returns a const ref Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20283: Apply change to internal header Signed-off-by: EduPonz <eduardoponz@eprosima.com> --------- Signed-off-by: EduPonz <eduardoponz@eprosima.com> (cherry picked from commit 06c8695) Co-authored-by: Eduardo Ponz Segrelles <eduardoponz@eprosima.com>
EduPonz
added a commit
that referenced
this pull request
Feb 15, 2024
* Refs #20283: get_log_resources returns a const ref Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20283: Apply change to internal header Signed-off-by: EduPonz <eduardoponz@eprosima.com> --------- Signed-off-by: EduPonz <eduardoponz@eprosima.com> (cherry picked from commit 06c8695) Co-authored-by: Eduardo Ponz Segrelles <eduardoponz@eprosima.com>
EduPonz
added a commit
that referenced
this pull request
Feb 24, 2024
* Refs #20283: get_log_resources returns a const ref Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20283: Apply change to internal header Signed-off-by: EduPonz <eduardoponz@eprosima.com> --------- Signed-off-by: EduPonz <eduardoponz@eprosima.com> (cherry picked from commit 06c8695) Co-authored-by: Eduardo Ponz Segrelles <eduardoponz@eprosima.com>
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.
Description
Every log call gets the verbosity of the log by calling
get_log_resources()->GetVerbosity()
. Prior to this PR, the call toget_log_resources()
would copy the internal shared pointer, which can become a costly operation, specially in a multithreaded context. This PR changes that internal method to return aconst
reference to the shared pointer instead of a copy.@Mergifyio backport 2.12.x 2.11.x 2.10.x 2.6.x
Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist