Skip to content

Commit b34d1df

Browse files
fix debug build for gcc-9
1 parent 930e6f2 commit b34d1df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dbms/src/Interpreters/DatabaseCatalog.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void DatabaseCatalog::shutdown()
137137

138138
DatabaseAndTable DatabaseCatalog::tryGetByUUID(const UUID & uuid) const
139139
{
140-
assert(uuid != UUIDHelpers::Nil && 0 <= getFirstLevelIdx(uuid) && getFirstLevelIdx(uuid) < uuid_map.size());
140+
assert(uuid != UUIDHelpers::Nil && getFirstLevelIdx(uuid) < uuid_map.size());
141141
const UUIDToStorageMapPart & map_part = uuid_map[getFirstLevelIdx(uuid)];
142142
std::lock_guard lock{map_part.mutex};
143143
auto it = map_part.map.find(uuid);
@@ -330,7 +330,7 @@ DatabasePtr DatabaseCatalog::getSystemDatabase() const
330330

331331
void DatabaseCatalog::addUUIDMapping(const UUID & uuid, DatabasePtr database, StoragePtr table)
332332
{
333-
assert(uuid != UUIDHelpers::Nil && 0 <= getFirstLevelIdx(uuid) && getFirstLevelIdx(uuid) < uuid_map.size());
333+
assert(uuid != UUIDHelpers::Nil && getFirstLevelIdx(uuid) < uuid_map.size());
334334
UUIDToStorageMapPart & map_part = uuid_map[getFirstLevelIdx(uuid)];
335335
std::lock_guard lock{map_part.mutex};
336336
auto [_, inserted] = map_part.map.try_emplace(uuid, std::move(database), std::move(table));
@@ -340,7 +340,7 @@ void DatabaseCatalog::addUUIDMapping(const UUID & uuid, DatabasePtr database, St
340340

341341
void DatabaseCatalog::removeUUIDMapping(const UUID & uuid)
342342
{
343-
assert(uuid != UUIDHelpers::Nil && 0 <= getFirstLevelIdx(uuid) && getFirstLevelIdx(uuid) < uuid_map.size());
343+
assert(uuid != UUIDHelpers::Nil && getFirstLevelIdx(uuid) < uuid_map.size());
344344
UUIDToStorageMapPart & map_part = uuid_map[getFirstLevelIdx(uuid)];
345345
std::lock_guard lock{map_part.mutex};
346346
if (!map_part.map.erase(uuid))

0 commit comments

Comments
 (0)