mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Support boost 1.76:
* remove unused `std::hash` specialization * Use `std::chrono::floor` instead of `floor`
This commit is contained in:
@@ -2202,8 +2202,8 @@ NetworkOPsImp::getServerInfo(bool human, bool admin, bool counters)
|
|||||||
|
|
||||||
info[jss::server_state] = strOperatingMode(admin);
|
info[jss::server_state] = strOperatingMode(admin);
|
||||||
|
|
||||||
info[jss::time] = to_string(
|
info[jss::time] = to_string(std::chrono::floor<std::chrono::microseconds>(
|
||||||
floor<std::chrono::microseconds>(std::chrono::system_clock::now()));
|
std::chrono::system_clock::now()));
|
||||||
|
|
||||||
if (needNetworkLedger_)
|
if (needNetworkLedger_)
|
||||||
info[jss::network_ledger] = "waiting";
|
info[jss::network_ledger] = "waiting";
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ public:
|
|||||||
auto last = getLastMsgTime();
|
auto last = getLastMsgTime();
|
||||||
if (last.time_since_epoch().count() != 0)
|
if (last.time_since_epoch().count() != 0)
|
||||||
result["last_message_arrival_time"] =
|
result["last_message_arrival_time"] =
|
||||||
to_string(floor<std::chrono::microseconds>(last));
|
to_string(std::chrono::floor<std::chrono::microseconds>(last));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,8 @@ public:
|
|||||||
auto last = getLastPublish();
|
auto last = getLastPublish();
|
||||||
if (last.time_since_epoch().count() != 0)
|
if (last.time_since_epoch().count() != 0)
|
||||||
result["last_publish_time"] =
|
result["last_publish_time"] =
|
||||||
to_string(floor<std::chrono::microseconds>(getLastPublish()));
|
to_string(std::chrono::floor<std::chrono::microseconds>(
|
||||||
|
getLastPublish()));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ PerfLogImp::report()
|
|||||||
lastLog_ = present;
|
lastLog_ = present;
|
||||||
|
|
||||||
Json::Value report(Json::objectValue);
|
Json::Value report(Json::objectValue);
|
||||||
report[jss::time] = to_string(floor<microseconds>(present));
|
report[jss::time] = to_string(std::chrono::floor<microseconds>(present));
|
||||||
{
|
{
|
||||||
std::lock_guard lock{counters_.jobsMutex_};
|
std::lock_guard lock{counters_.jobsMutex_};
|
||||||
report[jss::workers] =
|
report[jss::workers] =
|
||||||
|
|||||||
@@ -100,20 +100,6 @@ hash_append(Hasher& h, beast::IP::Address const& addr) noexcept
|
|||||||
}
|
}
|
||||||
} // namespace beast
|
} // namespace beast
|
||||||
|
|
||||||
namespace std {
|
|
||||||
template <>
|
|
||||||
struct hash<beast::IP::Address>
|
|
||||||
{
|
|
||||||
explicit hash() = default;
|
|
||||||
|
|
||||||
std::size_t
|
|
||||||
operator()(beast::IP::Address const& addr) const
|
|
||||||
{
|
|
||||||
return beast::uhash<>{}(addr);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
} // namespace std
|
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
template <>
|
template <>
|
||||||
struct hash<::beast::IP::Address>
|
struct hash<::beast::IP::Address>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
namespace test {
|
namespace test {
|
||||||
|
|||||||
Reference in New Issue
Block a user