Commit 86032fde authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Use single statement for declarations

parent 97bfedeb
......@@ -267,7 +267,9 @@ ColorEntry ColorScheme::colorEntry(int index, uint randomSeed) const
return entry;
}
double baseHue, baseSaturation, baseLightness;
double baseHue;
double baseSaturation;
double baseLightness;
rgb2hsluv(entry.redF(), entry.greenF(), entry.blueF(),
&baseHue, &baseSaturation, &baseLightness);
......@@ -322,7 +324,9 @@ ColorEntry ColorScheme::colorEntry(int index, uint randomSeed) const
? baseLightness
: lightnessDistribution(randomEngine);
double red, green, blue;
double red;
double green;
double blue;
hsluv2rgb(hue, saturation, lightness, &red, &green, &blue);
return {qRound(red * 255), qRound(green * 255), qRound(blue * 255)};
......@@ -398,7 +402,9 @@ QColor ColorScheme::backgroundColor() const
bool ColorScheme::hasDarkBackground() const
{
double h, s, l;
double h;
double s;
double l;
const double r = backgroundColor().redF();
const double g = backgroundColor().greenF();
const double b = backgroundColor().blueF();
......
......@@ -656,7 +656,9 @@ static inline bool drawBlockCharacter(QPainter &paint, int x, int y, int w, int
return true;
}
QBrush lightShade, mediumShade, darkShade;
QBrush lightShade;
QBrush mediumShade;
QBrush darkShade;
if (paint.testRenderHint(QPainter::Antialiasing)) {
lightShade = QColor(color.red(), color.green(), color.blue(), 64);
mediumShade = QColor(color.red(), color.green(), color.blue(), 128);
......
......@@ -1120,7 +1120,9 @@ void TerminalDisplay::updateImage()
Q_ASSERT(_usedLines <= _lines);
Q_ASSERT(_usedColumns <= _columns);
int y, x, len;
int y;
int x;
int len;
const QPoint tL = contentsRect().topLeft();
const int tLx = tL.x();
......@@ -1426,7 +1428,8 @@ void TerminalDisplay::paintFilters(QPainter& painter)
// and draw appropriate visuals to indicate the presence of the hotspot
const auto spots = _filterChain->hotSpots();
int urlNumber = 0, urlNumInc;
int urlNumber = 0;
int urlNumInc;
if (_reverseUrlHints) {
for (const auto &spot : spots) {
if (spot->type() == Filter::HotSpot::Link) {
......@@ -2354,7 +2357,8 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
QSharedPointer<Filter::HotSpot> TerminalDisplay::filterActions(const QPoint& position)
{
int charLine, charColumn;
int charLine;
int charColumn;
getCharacterPosition(position, charLine, charColumn, false);
return _filterChain->hotSpotAt(charLine, charColumn);
......
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