Skip to content

Commit

Permalink
Return const reference in get_log_resources (#4271)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
EduPonz authored and mergify[bot] committed Jan 27, 2024
1 parent 0c6da98 commit 0f8ed5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cpp/fastdds/log/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ struct LogResources

};

std::shared_ptr<LogResources> get_log_resources()
const std::shared_ptr<LogResources>& get_log_resources()
{
static std::shared_ptr<LogResources> instance = std::make_shared<LogResources>();
return instance;
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/fastdds/log/LogResources.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace detail {

struct LogResources;

std::shared_ptr<LogResources> get_log_resources();
const std::shared_ptr<LogResources>& get_log_resources();

} // namespace detail
} // namespace dds
Expand Down

0 comments on commit 0f8ed5a

Please sign in to comment.