summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/settingstree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistoryStats/src/settingstree.cpp')
-rw-r--r--plugins/HistoryStats/src/settingstree.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/HistoryStats/src/settingstree.cpp b/plugins/HistoryStats/src/settingstree.cpp
index 2e8ab0a0a4..a73ef0f442 100644
--- a/plugins/HistoryStats/src/settingstree.cpp
+++ b/plugins/HistoryStats/src/settingstree.cpp
@@ -74,7 +74,7 @@ void SettingsTree::fromString(const ext::string& config)
ext::string SettingsTree::toString() const
{
- static const TCHAR* replaces[5][2] = {
+ static const wchar_t* replaces[5][2] = {
{ L"\\", L"\\\\" },
{ L"{", L"\\{" },
{ L"}", L"\\}" },
@@ -113,7 +113,7 @@ ext::string SettingsTree::toString() const
return data;
}
-void SettingsTree::setKey(const TCHAR* key)
+void SettingsTree::setKey(const wchar_t* key)
{
m_CurKey = key;
@@ -125,7 +125,7 @@ void SettingsTree::setKey(const TCHAR* key)
m_pCurValues = NULL;
}
-bool SettingsTree::readBool(const TCHAR* setting, bool errorValue) const
+bool SettingsTree::readBool(const wchar_t* setting, bool errorValue) const
{
if (m_pCurValues) {
ValueMap::iterator i = m_pCurValues->find(setting);
@@ -138,19 +138,19 @@ bool SettingsTree::readBool(const TCHAR* setting, bool errorValue) const
return errorValue;
}
-int SettingsTree::readInt(const TCHAR* setting, int errorValue) const
+int SettingsTree::readInt(const wchar_t* setting, int errorValue) const
{
if (m_pCurValues) {
ValueMap::iterator i = m_pCurValues->find(setting);
if (i != m_pCurValues->end())
- return _ttoi(i->second.c_str());
+ return _wtoi(i->second.c_str());
}
return errorValue;
}
-int SettingsTree::readIntRanged(const TCHAR* setting, int errorValue, int minValue, int maxValue) const
+int SettingsTree::readIntRanged(const wchar_t* setting, int errorValue, int minValue, int maxValue) const
{
int value = readInt(setting, errorValue);
if (minValue <= value && value <= maxValue)
@@ -159,7 +159,7 @@ int SettingsTree::readIntRanged(const TCHAR* setting, int errorValue, int minVal
return errorValue;
}
-ext::string SettingsTree::readStr(const TCHAR* setting, const TCHAR* errorValue) const
+ext::string SettingsTree::readStr(const wchar_t* setting, const wchar_t* errorValue) const
{
if (m_pCurValues) {
ValueMap::iterator i = m_pCurValues->find(setting);
@@ -171,28 +171,28 @@ ext::string SettingsTree::readStr(const TCHAR* setting, const TCHAR* errorValue)
return errorValue;
}
-void SettingsTree::writeBool(const TCHAR* setting, bool value)
+void SettingsTree::writeBool(const wchar_t* setting, bool value)
{
makeKeyValid();
(*m_pCurValues)[setting] = value ? L"y" : L"n";
}
-void SettingsTree::writeInt(const TCHAR* setting, int value)
+void SettingsTree::writeInt(const wchar_t* setting, int value)
{
makeKeyValid();
(*m_pCurValues)[setting] = utils::intToString(value);
}
-void SettingsTree::writeStr(const TCHAR* setting, const TCHAR* value)
+void SettingsTree::writeStr(const wchar_t* setting, const wchar_t* value)
{
makeKeyValid();
(*m_pCurValues)[setting] = value;
}
-bool SettingsTree::hasSetting(const TCHAR* setting) const
+bool SettingsTree::hasSetting(const wchar_t* setting) const
{
if (m_pCurValues) {
ValueMap::const_iterator i = m_pCurValues->find(setting);
@@ -203,7 +203,7 @@ bool SettingsTree::hasSetting(const TCHAR* setting) const
return false;
}
-bool SettingsTree::delSetting(const TCHAR* setting)
+bool SettingsTree::delSetting(const wchar_t* setting)
{
if (m_pCurValues) {
ValueMap::iterator i = m_pCurValues->find(setting);