Skip to content

Commit

Permalink
Use std::shared_ptr instead of boost::shared_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed Apr 10, 2024
1 parent c7e67cc commit e3414c5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
3 changes: 1 addition & 2 deletions include/reach/plugins/boost_progress_console_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <reach/interfaces/logger.h>

#include <boost/shared_ptr.hpp>
#include <boost/timer/progress_display.hpp>
#include <mutex>

Expand All @@ -39,7 +38,7 @@ class BoostProgressConsoleLogger : public Logger

protected:
mutable std::mutex mutex_;
mutable boost::shared_ptr<boost::timer::progress_display> display_;
mutable std::shared_ptr<boost::timer::progress_display> display_;
};

struct BoostProgressConsoleLoggerFactory : public LoggerFactory
Expand Down
2 changes: 0 additions & 2 deletions include/reach/plugins/no_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <reach/interfaces/ik_solver.h>
#include <reach/interfaces/display.h>

#include <boost/shared_ptr.hpp>

namespace reach
{
struct NoOpEvaluator : public Evaluator
Expand Down
4 changes: 1 addition & 3 deletions include/reach/reach_visualizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#include <reach/interfaces/ik_solver.h>
#include <reach/utils.h>

#include <boost/shared_ptr.hpp>

namespace reach
{
/**
Expand All @@ -32,7 +30,7 @@ namespace reach
class ReachVisualizer
{
public:
using Ptr = boost::shared_ptr<ReachVisualizer>;
using Ptr = std::shared_ptr<ReachVisualizer>;

ReachVisualizer(ReachResult result, IKSolver::ConstPtr solver, Evaluator::ConstPtr evaluator,
Display::ConstPtr display, const double neighbor_radius);
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/boost_progress_console_logger.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <reach/plugins/boost_progress_console_logger.h>
#include <reach/types.h>

#include <boost/make_shared.hpp>
#include <iostream>

namespace reach
Expand All @@ -13,7 +12,7 @@ BoostProgressConsoleLogger::BoostProgressConsoleLogger() : display_(nullptr)
void BoostProgressConsoleLogger::setMaxProgress(unsigned long max_progress)
{
std::lock_guard<std::mutex> lock{ mutex_ };
display_ = boost::make_shared<boost::timer::progress_display>(max_progress);
display_ = std::make_shared<boost::timer::progress_display>(max_progress);
}

void BoostProgressConsoleLogger::printProgress(unsigned long progress) const
Expand Down

0 comments on commit e3414c5

Please sign in to comment.