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
+3 -3
View File
@@ -119,9 +119,9 @@ void TooltipWidget::set(const std::vector<TooltipEntry> &entries,
for (int i = 0; i < entries.size(); ++i)
{
if (auto entryWidget = this->entryAt(i))
if (auto *entryWidget = this->entryAt(i))
{
auto &entry = entries[i];
const auto &entry = entries[i];
entryWidget->setImage(entry.image);
entryWidget->setText(entry.text);
entryWidget->setImageScale(entry.customWidth, entry.customHeight);
@@ -306,7 +306,7 @@ void TooltipWidget::setWordWrap(bool wrap)
{
for (int i = 0; i < this->visibleEntries_; ++i)
{
auto entry = this->entryAt(i);
auto *entry = this->entryAt(i);
if (entry)
{
entry->setWordWrap(wrap);