fix clang13 warning

This commit is contained in:
Stig Bakken 2021-11-18 16:53:41 +01:00
parent b91f21d658
commit f8c53e839a

View File

@ -48,7 +48,7 @@ Pipe StorageMaterializedMySQL::read(
size_t max_block_size,
unsigned int num_streams)
{
if (auto * db = typeid_cast<const DatabaseMaterializedMySQL *>(database))
if (const auto * db = typeid_cast<const DatabaseMaterializedMySQL *>(database))
db->rethrowExceptionIfNeeded();
return readFinalFromNestedStorage(nested_storage, column_names, metadata_snapshot,
@ -57,7 +57,7 @@ Pipe StorageMaterializedMySQL::read(
NamesAndTypesList StorageMaterializedMySQL::getVirtuals() const
{
if (auto * db = typeid_cast<const DatabaseMaterializedMySQL *>(database))
if (const auto * db = typeid_cast<const DatabaseMaterializedMySQL *>(database))
db->rethrowExceptionIfNeeded();
return nested_storage->getVirtuals();