cid#1607257 Overflowed constant
this is a false positve, but perhaps we can help coverity work it out properly with some constexpr Change-Id: I8398153d6678585dacf4acaf7081ec32094bcda6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174150 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
df389675fc
commit
2009ecbeb1
@@ -123,7 +123,7 @@ void EntryCache::destroy (Entry * entry)
|
||||
}
|
||||
|
||||
// highbit():= log2() + 1 (complexity O(1))
|
||||
static int highbit(std::size_t n)
|
||||
static constexpr int highbit(std::size_t n)
|
||||
{
|
||||
int k = 1;
|
||||
|
||||
|
@@ -39,7 +39,7 @@ struct Entry;
|
||||
class PageCache :
|
||||
public store::OStoreObject
|
||||
{
|
||||
static size_t const theTableSize = 32;
|
||||
static size_t constexpr theTableSize = 32;
|
||||
static_assert((theTableSize & (theTableSize-1)) == 0, "table size should be a power of 2");
|
||||
|
||||
Entry ** m_hash_table;
|
||||
|
Reference in New Issue
Block a user