Minor tweaks.

This commit is contained in:
Birunthan Mohanathas
2011-11-16 16:47:20 +00:00
parent e119672f1c
commit b02371276f
19 changed files with 144 additions and 128 deletions

View File

@ -196,22 +196,23 @@ void CMeterBitmap::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_TransitionFrameCount = parser.ReadInt(section, L"BitmapTransitionFrames", 0);
const std::wstring& align = parser.ReadString(section, L"BitmapAlign", L"LEFT");
if (_wcsicmp(align.c_str(), L"LEFT") == 0)
const WCHAR* align = parser.ReadString(section, L"BitmapAlign", L"LEFT").c_str();
if (_wcsicmp(align, L"LEFT") == 0)
{
m_Align = ALIGN_LEFT;
}
else if (_wcsicmp(align.c_str(), L"RIGHT") == 0)
else if (_wcsicmp(align, L"RIGHT") == 0)
{
m_Align = ALIGN_RIGHT;
}
else if (_wcsicmp(align.c_str(), L"CENTER") == 0)
else if (_wcsicmp(align, L"CENTER") == 0)
{
m_Align = ALIGN_CENTER;
}
else
{
std::wstring error = L"BitmapAlign=" + align;
std::wstring error = L"BitmapAlign=";
error += align;
error += L" is not valid in [";
error += m_Name;
error += L"]";