diff --git a/Library/Measure.cpp b/Library/Measure.cpp index d0fbad1a..2b40783e 100644 --- a/Library/Measure.cpp +++ b/Library/Measure.cpp @@ -517,7 +517,7 @@ bool CMeasure::Update() { if (!m_IfAboveCommitted) { - m_IfAboveCommitted= true; // To avoid infinite loop from !Update + m_IfAboveCommitted = true; // To avoid infinite loop from !Update Rainmeter->ExecuteCommand(m_IfAboveAction.c_str(), m_MeterWindow); } } diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index 2065f765..de8d3136 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -2205,7 +2205,7 @@ bool CMeterWindow::ReadSkin() m_Meters.push_back(meter); meter->SetRelativeMeter(prevMeter); - if (!m_HasButtons && meter->GetTypeID() == TypeID()) + if (meter->GetTypeID() == TypeID()) { m_HasButtons = true; } @@ -2613,10 +2613,7 @@ bool CMeterWindow::UpdateMeasure(CMeasure* measure, bool force) measure->ReadOptions(m_Parser); } - if (measure->Update()) - { - bUpdate = true; - } + bUpdate = measure->Update(); } return bUpdate; @@ -2644,10 +2641,7 @@ bool CMeterWindow::UpdateMeter(CMeter* meter, bool& bActiveTransition, bool forc meter->ReadOptions(m_Parser); } - if (meter->Update()) - { - bUpdate = true; - } + bUpdate = meter->Update(); } // Update tooltips @@ -3447,10 +3441,7 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam) if (screenIndex >= 0 && (screenIndex == 0 || screenIndex <= (int)monitors.size() && monitors[screenIndex-1].active)) { - if (m_AutoSelectScreen) - { - m_AutoSelectScreen = false; - } + m_AutoSelectScreen = false; m_WindowXScreen = m_WindowYScreen = screenIndex; m_WindowXScreenDefined = m_WindowYScreenDefined = screenDefined; diff --git a/Library/lua/LuaScript.cpp b/Library/lua/LuaScript.cpp index 1e5a35c8..0c71bf3c 100644 --- a/Library/lua/LuaScript.cpp +++ b/Library/lua/LuaScript.cpp @@ -138,10 +138,7 @@ bool LuaScript::IsFunction(const char* funcName) // Push the function onto the stack lua_getfield(L, -1, funcName); - if (lua_isfunction(L, -1)) - { - bExists = true; - } + bExists = lua_isfunction(L, -1); // Pop both the table and the function off the stack. lua_pop(L, 2);