aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2015-01-19 17:39:38 -0500
committerThomas Winget <tewinget@gmail.com>2015-01-19 17:39:38 -0500
commitacd4c369e4330562f7dbb22b665b3a1222835b55 (patch)
treef8d714e78a58326844ffbbc3afa52c8262575d34 /src/cryptonote_core
parentAdd in-source lmdb to build process (diff)
downloadmonero-acd4c369e4330562f7dbb22b665b3a1222835b55.tar.xz
Should fix std::min issues related to size_t
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 88ae9d136..c5771882d 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -616,7 +616,7 @@ difficulty_type Blockchain::get_difficulty_for_next_block() const
std::vector<difficulty_type> cumulative_difficulties;
auto h = m_db->height();
- size_t offset = h - std::min(h, static_cast<size_t>(DIFFICULTY_BLOCKS_COUNT));
+ size_t offset = h - std::min<size_t>(h, static_cast<size_t>(DIFFICULTY_BLOCKS_COUNT));
if (offset == 0)
{
@@ -892,7 +892,7 @@ void Blockchain::get_last_n_blocks_sizes(std::vector<size_t>& sz, size_t count)
return;
// add size of last <count> blocks to vector <sz> (or less, if blockchain size < count)
- size_t start_offset = h - std::min(h, count);
+ size_t start_offset = h - std::min<size_t>(h, count);
for(size_t i = start_offset; i < h; i++)
{
sz.push_back(m_db->get_block_size(i));