mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Prefer std::optional over boost:optional:
Some of the boost::optionals must remain for now. Both boost::beast and SOCI have interfaces that require boost::optional.
This commit is contained in:
committed by
Nik Bougalis
parent
85307b29d0
commit
3b33318dc8
@@ -22,12 +22,12 @@
|
||||
#include <ripple/beast/core/CurrentThreadName.h>
|
||||
#include <ripple/core/impl/SNTPClock.h>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <cmath>
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <thread>
|
||||
|
||||
namespace ripple {
|
||||
@@ -90,7 +90,7 @@ private:
|
||||
std::mutex mutable mutex_;
|
||||
std::thread thread_;
|
||||
boost::asio::io_service io_service_;
|
||||
boost::optional<boost::asio::io_service::work> work_;
|
||||
std::optional<boost::asio::io_service::work> work_;
|
||||
|
||||
std::map<boost::asio::ip::udp::endpoint, Query> queries_;
|
||||
boost::asio::ip::udp::socket socket_;
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
error_code ec;
|
||||
timer_.cancel(ec);
|
||||
socket_.cancel(ec);
|
||||
work_ = boost::none;
|
||||
work_ = std::nullopt;
|
||||
thread_.join();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user