Skip to content
Browse files

Make SetXXX methods case-sensitive.

This will make key search faster by 50%-75%.
This also can potentially break some bad-designed code, but in my test all is working fine.
  • Loading branch information...
1 parent cd9e237 commit 4ddbc49ccb6404ccf19742d1a2022c0a28d9be45 @Karlson2k Karlson2k committed Aug 6, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 xbmc/settings/GUISettings.cpp
View
8 xbmc/settings/GUISettings.cpp
@@ -1084,7 +1084,7 @@ bool CGUISettings::GetBool(const char *strSetting) const
void CGUISettings::SetBool(const char *strSetting, bool bSetting)
{
ASSERT(settingsMap.size());
- mapIter it = settingsMap.find(CStdString(strSetting).ToLower());
+ mapIter it = settingsMap.find(strSetting);
if (it != settingsMap.end())
{ // old category
((CSettingBool*)(*it).second)->SetData(bSetting);
@@ -1138,7 +1138,7 @@ float CGUISettings::GetFloat(const char *strSetting) const
void CGUISettings::SetFloat(const char *strSetting, float fSetting)
{
ASSERT(settingsMap.size());
- mapIter it = settingsMap.find(CStdString(strSetting).ToLower());
+ mapIter it = settingsMap.find(strSetting);
if (it != settingsMap.end())
{
((CSettingFloat *)(*it).second)->SetData(fSetting);
@@ -1212,7 +1212,7 @@ int CGUISettings::GetInt(const char *strSetting) const
void CGUISettings::SetInt(const char *strSetting, int iSetting)
{
ASSERT(settingsMap.size());
- mapIter it = settingsMap.find(CStdString(strSetting).ToLower());
+ mapIter it = settingsMap.find(strSetting);
if (it != settingsMap.end())
{
((CSettingInt *)(*it).second)->SetData(iSetting);
@@ -1286,7 +1286,7 @@ const CStdString &CGUISettings::GetString(const char *strSetting, bool bPrompt /
void CGUISettings::SetString(const char *strSetting, const char *strData)
{
ASSERT(settingsMap.size());
- mapIter it = settingsMap.find(CStdString(strSetting).ToLower());
+ mapIter it = settingsMap.find(strSetting);
if (it != settingsMap.end())
{
((CSettingString *)(*it).second)->SetData(strData);

0 comments on commit 4ddbc49

Please sign in to comment.
Something went wrong with that request. Please try again.