Minor tweaks

This commit is contained in:
spx 2013-01-29 15:59:08 +09:00
parent c0d969f4b6
commit 89d477b4e1
3 changed files with 6 additions and 18 deletions

View File

@ -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);
}
}

View File

@ -2205,7 +2205,7 @@ bool CMeterWindow::ReadSkin()
m_Meters.push_back(meter);
meter->SetRelativeMeter(prevMeter);
if (!m_HasButtons && meter->GetTypeID() == TypeID<CMeterButton>())
if (meter->GetTypeID() == TypeID<CMeterButton>())
{
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;

View File

@ -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);