diff --git a/core/include/gz/msgs/MessageFactory.hh b/core/include/gz/msgs/MessageFactory.hh index 3500986e..6bb0cd01 100644 --- a/core/include/gz/msgs/MessageFactory.hh +++ b/core/include/gz/msgs/MessageFactory.hh @@ -26,6 +26,7 @@ #include "gz/msgs/config.hh" #include "gz/msgs/Export.hh" #include "gz/msgs/detail/dynamic_message_cast.hh" +#include namespace gz::msgs { /// Forward declarations @@ -113,7 +114,7 @@ namespace gz::msgs { private: FactoryFnCollection msgMap; /// \brief Pointer to dynamic factory implementation - private: std::unique_ptr dynamicFactory; + GZ_UTILS_UNIQUE_IMPL_PTR_FWD(gz::msgs::DynamicFactory, dynamicFactory) }; } } // namespace gz::msgs diff --git a/core/src/MessageFactory.cc b/core/src/MessageFactory.cc index 245f3660..55d0ac5b 100644 --- a/core/src/MessageFactory.cc +++ b/core/src/MessageFactory.cc @@ -26,13 +26,14 @@ #include "DynamicFactory.hh" #include "gz/msgs/MessageFactory.hh" +#include namespace gz::msgs { ///////////////////////////////////////////////// MessageFactory::MessageFactory(): - dynamicFactory(std::make_unique()) + dynamicFactory(gz::utils::MakeUniqueImpl()) { }