Fix -Wunused-variable

Summary:
Compiler warning message:
    [524/1591] Building CXX object CMakeFiles/kwin.dir/workspace.cpp.o
    /home/vlad/Workspace/KDE/src/kde/workspace/kwin/workspace.cpp: In lambda function:
    /home/vlad/Workspace/KDE/src/kde/workspace/kwin/workspace.cpp:233:47: warning: unused variable ‘otherDesktop’ [-Wunused-variable]
                             const VirtualDesktop *otherDesktop = VirtualDesktopManager::self()->desktops().first();
                                                   ^~~~~~~~~~~~

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17060
This commit is contained in:
Vlad Zagorodniy 2018-11-20 20:12:30 +02:00
parent 8d005caaae
commit 3aa3321048

View file

@ -230,7 +230,6 @@ void Workspace::init()
const bool needsMove = (*it)->desktops().count() == 1;
(*it)->removeDesktop(desktop);
if (needsMove) {
const VirtualDesktop *otherDesktop = VirtualDesktopManager::self()->desktops().first();
sendClientToDesktop(*it, qMin(desktop->x11DesktopNumber(), VirtualDesktopManager::self()->count()), true);
}
}