summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/settingstree.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/HistoryStats/src/settingstree.cpp
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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);