diff --git a/arangod/Agency/State.cpp b/arangod/Agency/State.cpp index 7fe1bccc89..0445909ebe 100644 --- a/arangod/Agency/State.cpp +++ b/arangod/Agency/State.cpp @@ -131,7 +131,7 @@ bool State::log (query_t const& queries, term_t term, id_t leaderId, std::vector State::get (index_t start, index_t end) const { std::vector entries; MUTEX_LOCKER(mutexLocker, _logLock); - if (end == std::numeric_limits::max()) + if (end == (std::numeric_limits::max)()) end = _log.size() - 1; for (size_t i = start; i <= end; ++i) {// TODO:: Check bounds entries.push_back(_log[i]); @@ -142,7 +142,7 @@ std::vector State::get (index_t start, index_t end) const { std::vector State::slices (index_t start, index_t end) const { std::vector slices; MUTEX_LOCKER(mutexLocker, _logLock); - if (end == std::numeric_limits::max()) + if (end == (std::numeric_limits::max)()) end = _log.size() - 1; for (size_t i = start; i <= end; ++i) {// TODO:: Check bounds slices.push_back(VPackSlice(_log[i].entry->data()));