diff --git a/src/Storages/IStorage.cpp b/src/Storages/IStorage.cpp index 4ca7fdaf62a..d3636e6c756 100644 --- a/src/Storages/IStorage.cpp +++ b/src/Storages/IStorage.cpp @@ -206,7 +206,7 @@ bool IStorage::isReadOnly() const auto storage_policy = getStoragePolicy(); if (storage_policy) { - for (const auto disk : storage_policy->getDisks()) + for (const auto & disk : storage_policy->getDisks()) if (!disk->isReadOnly()) return false; return true;