3
0
Fork 0

Force the template specialization for the min function.

'max' is a size_t and 'blob()->size()-pos' is a uint64_t.
Depending of the compiler (version, options, ...) this is a error as
we don't know which template specialization we have to use.
small_fixes
Matthieu Gautier 9 years ago
parent 9aa7e371f7
commit 5cfbda1219

@ -242,7 +242,7 @@ ssize_t callback_reader_from_blob(void *cls,
{
zim::Blob* blob = static_cast<zim::Blob*>(cls);
pthread_mutex_lock(&readerLock);
size_t max_size_to_set = min(max, blob->size()-pos);
size_t max_size_to_set = min<size_t>(max, blob->size()-pos);
if (max_size_to_set <= 0)
{

Loading…
Cancel
Save