Commit 6053bbd2 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Sprinkle static keywords

There is no need to query the environment variables every time kwin
tries to determine the current compositing refresh rate.
parent abab1660
......@@ -625,7 +625,7 @@ static bool refreshRate_compare(const AbstractOutput *first, const AbstractOutpu
static int currentRefreshRate()
{
const int refreshRate = qEnvironmentVariableIntValue("KWIN_X11_REFRESH_RATE");
static const int refreshRate = qEnvironmentVariableIntValue("KWIN_X11_REFRESH_RATE");
if (refreshRate) {
return refreshRate;
}
......@@ -635,7 +635,7 @@ static int currentRefreshRate()
return 60000;
}
const QString syncDisplayDevice = qEnvironmentVariable("__GL_SYNC_DISPLAY_DEVICE");
static const QString syncDisplayDevice = qEnvironmentVariable("__GL_SYNC_DISPLAY_DEVICE");
if (!syncDisplayDevice.isEmpty()) {
for (const AbstractOutput *output : outputs) {
if (output->name() == syncDisplayDevice) {
......
Supports Markdown
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