diff --git a/arangod/V8Server/v8-collection.cpp b/arangod/V8Server/v8-collection.cpp index b20fd05d16..3df173fd4a 100644 --- a/arangod/V8Server/v8-collection.cpp +++ b/arangod/V8Server/v8-collection.cpp @@ -2232,8 +2232,8 @@ static void JS_PropertiesVocbaseCol (const v8::FunctionCallbackInfo& } if (po->Has(TRI_V8_ASCII_STRING("indexBuckets"))) { - indexBuckets = TRI_ObjectToUInt64( - po->Get(TRI_V8_ASCII_STRING("indexBuckets")), true); + indexBuckets = static_cast(TRI_ObjectToUInt64( + po->Get(TRI_V8_ASCII_STRING("indexBuckets")), true)); if (indexBuckets == 0 || indexBuckets > 1024) { ReleaseCollection(collection); TRI_V8_THROW_EXCEPTION_PARAMETER("indexBuckets must be a two-power between 1 and 1024"); diff --git a/arangod/V8Server/v8-vocindex.cpp b/arangod/V8Server/v8-vocindex.cpp index 22dbda6c62..e6d3355637 100644 --- a/arangod/V8Server/v8-vocindex.cpp +++ b/arangod/V8Server/v8-vocindex.cpp @@ -1707,7 +1707,7 @@ static void CreateVocBase (const v8::FunctionCallbackInfo& args, if (p->Has(TRI_V8_ASCII_STRING("indexBuckets"))) { parameters._indexBuckets - = TRI_ObjectToUInt64(p->Get(TRI_V8_ASCII_STRING("indexBuckets")), true); + = static_cast(TRI_ObjectToUInt64(p->Get(TRI_V8_ASCII_STRING("indexBuckets")), true)); if (parameters._indexBuckets < 1 || parameters._indexBuckets > 1024) { TRI_FreeCollectionInfoOptions(¶meters); diff --git a/arangod/VocBase/index.cpp b/arangod/VocBase/index.cpp index 3f625bbd93..7645625177 100644 --- a/arangod/VocBase/index.cpp +++ b/arangod/VocBase/index.cpp @@ -939,7 +939,7 @@ static int SizeHintEdge (TRI_index_t* idx, // set an initial size for the index for some new nodes to be created // without resizing - int err = edgesIndex->resize(size + 2049); + int err = edgesIndex->resize(static_cast(size + 2049)); if (err != TRI_ERROR_NO_ERROR) { return err; @@ -953,7 +953,7 @@ static int SizeHintEdge (TRI_index_t* idx, // set an initial size for the index for some new nodes to be created // without resizing - return edgesIndex->resize(size + 2049); + return edgesIndex->resize(static_cast(size + 2049)); } // ----------------------------------------------------------------------------- diff --git a/lib/Basics/AssocMulti.h b/lib/Basics/AssocMulti.h index 8587085cd3..fad1337014 100644 --- a/lib/Basics/AssocMulti.h +++ b/lib/Basics/AssocMulti.h @@ -764,14 +764,14 @@ namespace triagens { //////////////////////////////////////////////////////////////////////////////// int resize (IndexType size) throw() { - size /= _buckets.size(); + size /= static_cast(_buckets.size()); for (auto& b : _buckets) { - if (2 * (2*size+1) < 3 * b._nrUsed) { + if (2 * (2 * size + 1) < 3 * b._nrUsed) { return TRI_ERROR_BAD_PARAMETER; } try { - resizeInternal(b, 2*size+1); + resizeInternal(b, 2 * size + 1); } catch (...) { return TRI_ERROR_OUT_OF_MEMORY; @@ -842,7 +842,7 @@ namespace triagens { Entry* oldTable = b._table; IndexType oldAlloc = b._nrAlloc; - b._nrAlloc = TRI_NearPrime(size); + b._nrAlloc = static_cast(TRI_NearPrime(size)); try { b._table = new Entry[b._nrAlloc]; IndexType i; @@ -1145,7 +1145,7 @@ namespace triagens { //////////////////////////////////////////////////////////////////////////////// inline IndexType hashToIndex (uint64_t const h) const { - return sizeof(IndexType) == 8 ? h : TRI_64to32(h); + return static_cast(sizeof(IndexType) == 8 ? h : TRI_64to32(h)); } };