1
0
Fork 0

fixed some MSVC warnings

This commit is contained in:
jsteemann 2017-08-30 13:11:55 +02:00
parent cc11155341
commit 5677baf561
4 changed files with 7 additions and 9 deletions

View File

@ -397,11 +397,11 @@ bool IndexBlock::skipIndex(size_t atMost) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_DEBUG); THROW_ARANGO_EXCEPTION(TRI_ERROR_DEBUG);
} }
uint64_t returned = (uint64_t) _returned; uint64_t returned = static_cast<uint64_t>(_returned);
bool ok = _cursor->skip(atMost - returned, returned); int res = _cursor->skip(atMost - returned, returned);
_returned = (size_t) returned; _returned = static_cast<size_t>(returned);
if (ok) { if (res == TRI_ERROR_NO_ERROR) {
// We have skipped enough. // We have skipped enough.
// And this index could return more. // And this index could return more.
// We are good. // We are good.

View File

@ -270,7 +270,7 @@ bool Cache::reclaimMemory(uint64_t size) {
return underLimit; return underLimit;
} }
uint32_t Cache::hashKey(void const* key, uint32_t keySize) const { uint32_t Cache::hashKey(void const* key, size_t keySize) const {
return (std::max)(static_cast<uint32_t>(1), return (std::max)(static_cast<uint32_t>(1),
fasthash32(key, keySize, 0xdeadbeefUL)); fasthash32(key, keySize, 0xdeadbeefUL));
} }

View File

@ -189,7 +189,7 @@ class Cache : public std::enable_shared_from_this<Cache> {
static void freeValue(CachedValue* value); static void freeValue(CachedValue* value);
bool reclaimMemory(uint64_t size); bool reclaimMemory(uint64_t size);
uint32_t hashKey(void const* key, uint32_t keySize) const; uint32_t hashKey(void const* key, size_t keySize) const;
void recordStat(Stat stat); void recordStat(Stat stat);
bool reportInsert(bool hadEviction); bool reportInsert(bool hadEviction);

View File

@ -108,13 +108,11 @@ JSLoader::eState JSLoader::loadScript(v8::Isolate* isolate,
if (tryCatch.HasCaught()) { if (tryCatch.HasCaught()) {
if (tryCatch.CanContinue()) { if (tryCatch.CanContinue()) {
TRI_LogV8Exception(isolate, &tryCatch); TRI_LogV8Exception(isolate, &tryCatch);
return eFailExecute;
} else { } else {
TRI_GET_GLOBALS(); TRI_GET_GLOBALS();
v8g->_canceled = true; v8g->_canceled = true;
return eFailExecute;
} }
return eFailExecute;
} }
// Report the result if there is one: // Report the result if there is one: