Skip to content

Commit

Permalink
Change to implptr
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Jun 23, 2023
1 parent a110933 commit 7a0dbe0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/include/gz/msgs/MessageFactory.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "gz/msgs/config.hh"
#include "gz/msgs/Export.hh"
#include "gz/msgs/detail/dynamic_message_cast.hh"
#include <gz/utils/ImplPtr.hh>

namespace gz::msgs {
/// Forward declarations
Expand Down Expand Up @@ -113,7 +114,7 @@ namespace gz::msgs {
private: FactoryFnCollection msgMap;

/// \brief Pointer to dynamic factory implementation
private: std::unique_ptr<gz::msgs::DynamicFactory> dynamicFactory;
GZ_UTILS_UNIQUE_IMPL_PTR_FWD(gz::msgs::DynamicFactory, dynamicFactory)
};
}
} // namespace gz::msgs
Expand Down
3 changes: 2 additions & 1 deletion core/src/MessageFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@

#include "DynamicFactory.hh"
#include "gz/msgs/MessageFactory.hh"
#include <gz/utils/ImplPtr.hh>

namespace gz::msgs
{

/////////////////////////////////////////////////
MessageFactory::MessageFactory():
dynamicFactory(std::make_unique<gz::msgs::DynamicFactory>())
dynamicFactory(gz::utils::MakeUniqueImpl<gz::msgs::DynamicFactory>())
{
}

Expand Down

0 comments on commit 7a0dbe0

Please sign in to comment.