diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-10-10 15:47:08 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-11-14 16:56:10 +0000 |
commit | 383ff4f68943c5d998fba8caa20aee481583f214 (patch) | |
tree | 23eefe275400a75af13faa49af8198ba3ab1183c /src/cryptonote_protocol | |
parent | Merge pull request #2720 (diff) | |
download | monero-383ff4f68943c5d998fba8caa20aee481583f214.tar.xz |
remove "using namespace std" from headers
It's nasty, and actually breaks on Solaris, where if.h fails to
build due to:
struct map *if_memmap;
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index e41491954..73433a8d8 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -297,9 +297,9 @@ namespace cryptonote m_core.set_target_blockchain_height((hshd.current_height)); int64_t diff = static_cast<int64_t>(hshd.current_height) - static_cast<int64_t>(m_core.get_current_blockchain_height()); uint64_t abs_diff = std::abs(diff); - uint64_t max_block_height = max(hshd.current_height,m_core.get_current_blockchain_height()); + uint64_t max_block_height = std::max(hshd.current_height,m_core.get_current_blockchain_height()); uint64_t last_block_v1 = m_core.get_testnet() ? 624633 : 1009826; - uint64_t diff_v2 = max_block_height > last_block_v1 ? min(abs_diff, max_block_height - last_block_v1) : 0; + uint64_t diff_v2 = max_block_height > last_block_v1 ? std::min(abs_diff, max_block_height - last_block_v1) : 0; MCLOG(is_inital ? el::Level::Info : el::Level::Debug, "global", context << "Sync data returned a new top block candidate: " << m_core.get_current_blockchain_height() << " -> " << hshd.current_height << " [Your node is " << abs_diff << " blocks (" << ((abs_diff - diff_v2) / (24 * 60 * 60 / DIFFICULTY_TARGET_V1)) + (diff_v2 / (24 * 60 * 60 / DIFFICULTY_TARGET_V2)) << " days) " << (0 <= diff ? std::string("behind") : std::string("ahead")) |