mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +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::time] = to_string(
|
||||
floor<std::chrono::microseconds>(std::chrono::system_clock::now()));
|
||||
info[jss::time] = to_string(std::chrono::floor<std::chrono::microseconds>(
|
||||
std::chrono::system_clock::now()));
|
||||
|
||||
if (needNetworkLedger_)
|
||||
info[jss::network_ledger] = "waiting";
|
||||
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
auto last = getLastMsgTime();
|
||||
if (last.time_since_epoch().count() != 0)
|
||||
result["last_message_arrival_time"] =
|
||||
to_string(floor<std::chrono::microseconds>(last));
|
||||
to_string(std::chrono::floor<std::chrono::microseconds>(last));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -316,7 +316,8 @@ public:
|
||||
auto last = getLastPublish();
|
||||
if (last.time_since_epoch().count() != 0)
|
||||
result["last_publish_time"] =
|
||||
to_string(floor<std::chrono::microseconds>(getLastPublish()));
|
||||
to_string(std::chrono::floor<std::chrono::microseconds>(
|
||||
getLastPublish()));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ PerfLogImp::report()
|
||||
lastLog_ = present;
|
||||
|
||||
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_};
|
||||
report[jss::workers] =
|
||||
|
||||
@@ -100,20 +100,6 @@ hash_append(Hasher& h, beast::IP::Address const& addr) noexcept
|
||||
}
|
||||
} // 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 {
|
||||
template <>
|
||||
struct hash<::beast::IP::Address>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace test {
|
||||
|
||||
Reference in New Issue
Block a user