Skip to content

Commit

Permalink
Remove ign-utils from TempDirectory
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <michael@openrobotics.org>
  • Loading branch information
mjcarroll committed Sep 15, 2021
1 parent d06ed33 commit 296ca2d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 4 additions & 3 deletions include/ignition/common/TempDirectory.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#include <ignition/common/Export.hh>
#include <ignition/common/Filesystem.hh>
#include <ignition/utils/ImplPtr.hh>

namespace ignition
{
Expand Down Expand Up @@ -101,8 +100,10 @@ namespace ignition
/// \return the temporary directory path
public: std::string Path() const;

/// \brief Private data pointer.
IGN_UTILS_IMPL_PTR(dataPtr)
IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Private data pointer
private: std::unique_ptr<TempDirectoryPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
} // namespace common
} // namespace ignition
Expand Down
3 changes: 0 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
target_include_directories(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE
${ignition-math${IGN_MATH_VER}_INCLUDE_DIRS})

target_include_directories(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC
${ignition-utils${IGN_UTILS_VER}_INCLUDE_DIRS})

# Handle non-Windows configuration settings
if(NOT WIN32)
# Link the libraries that we don't expect to find on Windows
Expand Down
4 changes: 2 additions & 2 deletions src/TempDirectory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ std::string ignition::common::createTempDirectory(
}


class ignition::common::TempDirectory::Implementation
class ignition::common::TempDirectoryPrivate
{
/// \brief Current working directory before creation of temporary dir.
public: std::string oldPath {""};
Expand All @@ -175,7 +175,7 @@ class ignition::common::TempDirectory::Implementation
TempDirectory::TempDirectory(const std::string &_prefix,
const std::string &_subDir,
bool _cleanup):
dataPtr(ignition::utils::MakeImpl<Implementation>())
dataPtr(std::make_unique<TempDirectoryPrivate>())
{

this->dataPtr->oldPath = common::cwd();
Expand Down

0 comments on commit 296ca2d

Please sign in to comment.