Solve initialization bug in MOveCenterTabController
GCC gave error ../src/tabcontrollers/MoveCenterTabController.cpp:57:67: error: operation on ‘((advsettings::MoveCenterTabController*)this)->advsettings::MoveCenterTabController::lastMoveButtonClick[0]’ may be undefined [-Werror=sequence-point] Because assigning a value to itself twice is undefined behavior. It is highly likely that intended behavior was to initialize both array members to the same value at once.
This commit is contained in:
@@ -54,7 +54,7 @@ void MoveCenterTabController::initStage1() {
|
||||
m_lockZToggle = value.toBool();
|
||||
}
|
||||
settings->endGroup();
|
||||
lastMoveButtonClick[0] = lastMoveButtonClick[0] = clock::now();
|
||||
lastMoveButtonClick[0] = lastMoveButtonClick[1] = clock::now();
|
||||
}
|
||||
|
||||
void MoveCenterTabController::initStage2(OverlayController * parent, QQuickWindow * widget) {
|
||||
|
||||
Reference in New Issue
Block a user