Skip to content

Commit

Permalink
Tweaks and cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
brianferguson committed Sep 19, 2022
1 parent 2ace7dd commit 17d493c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Library/MeasureWifiStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ MeasureWifiStatus::MeasureWifiStatus(Skin* skin, const WCHAR* name) : Measure(sk
if (!s_Client)
{
DWORD dwNegotiatedVersion = 0UL;
DWORD dwErr =WlanOpenHandle(WLAN_API_VERSION, nullptr, &dwNegotiatedVersion, &s_Client);
DWORD dwErr = WlanOpenHandle(WLAN_API_VERSION, nullptr, &dwNegotiatedVersion, &s_Client);
if (ERROR_SUCCESS != dwErr)
{
FinalizeHandle();
Expand Down
6 changes: 0 additions & 6 deletions Library/MeterLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,6 @@ bool MeterLine::Draw(Gfx::Canvas& canvas)
}
}

if (maxValue == minValue)
{
//minValue = 0.0;
//maxValue = 1.0;
}

D2D1_RECT_F meterRect = GetMeterRectPadding();
int drawW = (int)(meterRect.right - meterRect.left);
int drawH = (int)(meterRect.bottom - meterRect.top);
Expand Down
6 changes: 3 additions & 3 deletions Library/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ UINT GetUniqueID()

WCHAR* GetString(UINT id)
{
LPWSTR pData;
LPWSTR pData = nullptr;
int len = LoadString(GetRainmeter().GetResourceInstance(), id, (LPWSTR)&pData, 0);
return len ? pData : L"";
return len > 0 ? pData : L"";
}

std::wstring GetFormattedString(UINT id, ...)
Expand Down Expand Up @@ -55,7 +55,7 @@ HICON GetIcon(UINT id, bool large)
auto loadIconMetric = (decltype(LoadIconMetric)*)GetProcAddress(hComctl, "LoadIconMetric");
if (loadIconMetric)
{
HICON icon;
HICON icon = { 0 };
HRESULT hr = loadIconMetric(hExe, MAKEINTRESOURCE(id), large ? LIM_LARGE : LIM_SMALL, &icon);
if (SUCCEEDED(hr))
{
Expand Down

0 comments on commit 17d493c

Please sign in to comment.