Commit 2c1e09a9 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

Proper variable scope

parent eac43163
......@@ -332,12 +332,12 @@ QString Output::preferredModeId() const
return d->biggestMode(modes());
}
int area, total = 0;
int total = 0;
KScreen::ModePtr biggest;
KScreen::ModePtr candidateMode;
Q_FOREACH(const QString &modeId, d->preferredModes) {
candidateMode = mode(modeId);
area = candidateMode->size().width() * candidateMode->size().height();
const int area = candidateMode->size().width() * candidateMode->size().height();
if (area < total) {
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment