diff --git a/src/libs/sqlite/sqliteids.h b/src/libs/sqlite/sqliteids.h index a0562b4df44..7613a2df46f 100644 --- a/src/libs/sqlite/sqliteids.h +++ b/src/libs/sqlite/sqliteids.h @@ -63,7 +63,7 @@ public: #pragma GCC diagnostic pop #endif - constexpr bool isValid() const { return id >= 0; } + constexpr bool isValid() const { return id > 0; } explicit operator bool() const { return isValid(); } @@ -74,7 +74,7 @@ public: [[noreturn, deprecated]] InternalIntegerType operator&() const { throw std::exception{}; } private: - InternalIntegerType id = -1; + InternalIntegerType id = 0; }; template diff --git a/tests/unit/unittest/storagecache-test.cpp b/tests/unit/unittest/storagecache-test.cpp index 3e3763dae4b..543b4dc5787 100644 --- a/tests/unit/unittest/storagecache-test.cpp +++ b/tests/unit/unittest/storagecache-test.cpp @@ -90,11 +90,11 @@ protected: Utils::PathString filePath5{"/file/pathFife"}; Utils::PathStringVector filePaths{filePath1, filePath2, filePath3, filePath4, filePath5}; Utils::PathStringVector reverseFilePaths{filePath1, filePath2, filePath3, filePath4, filePath5}; - SourceContextId id1{SourceContextId::create(0)}; - SourceContextId id2{SourceContextId::create(1)}; - SourceContextId id3{SourceContextId::create(2)}; - SourceContextId id4{SourceContextId::create(3)}; - SourceContextId id5{SourceContextId::create(4)}; + SourceContextId id1{SourceContextId::create(1)}; + SourceContextId id2{SourceContextId::create(2)}; + SourceContextId id3{SourceContextId::create(3)}; + SourceContextId id4{SourceContextId::create(4)}; + SourceContextId id5{SourceContextId::create(5)}; SourceContextId id41{SourceContextId::create(41)}; SourceContextId id42{SourceContextId::create(42)}; SourceContextId id43{SourceContextId::create(43)};