refactor: fix clang-tidy auto*, const&, and curly braces (#5083)

This commit is contained in:
pajlada
2024-01-14 17:54:52 +01:00
committed by GitHub
parent 292f9b9734
commit 5b6675abb4
78 changed files with 647 additions and 228 deletions
+14
View File
@@ -66,9 +66,13 @@ const std::shared_ptr<Image> &getImagePriv(const ImageSet &set, float scale)
int quality = 1;
if (scale > 2.001f)
{
quality = 3;
}
else if (scale > 1.001f)
{
quality = 2;
}
if (!set.getImage3()->isEmpty() && quality == 3)
{
@@ -92,17 +96,27 @@ const ImagePtr &ImageSet::getImageOrLoaded(float scale) const
// prefer other image if selected image is not loaded yet
if (result->loaded())
{
return result;
}
else if (this->imageX3_ && !this->imageX3_->isEmpty() &&
this->imageX3_->loaded())
{
return this->imageX3_;
}
else if (this->imageX2_ && !this->imageX2_->isEmpty() &&
this->imageX2_->loaded())
{
return this->imageX2_;
}
else if (this->imageX1_->loaded())
{
return this->imageX1_;
}
else
{
return result;
}
}
const ImagePtr &ImageSet::getImage(float scale) const