Small clang-10 warning fixes + ya.make

This commit is contained in:
Gleb Novikov 2020-05-25 11:42:59 +03:00 committed by Vladimir Chebotarev
parent db56820fab
commit 96c7cc8724
2 changed files with 3 additions and 2 deletions

View File

@ -46,7 +46,7 @@ MultiDiskReservation::MultiDiskReservation(Reservations &reservations_, UInt64 s
: reservations(std::move(reservations_))
, size(size_)
{
if (reservations.size() == 0)
if (reservations.empty())
{
throw Exception("At least one reservation must be provided to MultiDiskReservation", ErrorCodes::NO_RESERVATIONS_PROVIDED);
}
@ -64,7 +64,7 @@ Disks MultiDiskReservation::getDisks() const
{
Disks res;
res.reserve(reservations.size());
for (auto &r: reservations)
for (const auto &r: reservations)
{
res.push_back(r->getDisk());
}

View File

@ -16,6 +16,7 @@ SRCS(
SingleDiskVolume.cpp
StoragePolicy.cpp
VolumeJBOD.cpp
VolumeRAID1.cpp
)
END()