summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/SettingsStore.cpp
authorwimpie <wimpie>2004-04-09 18:04:30 (UTC)
committer wimpie <wimpie>2004-04-09 18:04:30 (UTC)
commit028717962deec0c2ff0e382221cbc2242393b79e (patch) (side-by-side diff)
treea5f00a3b3d229f838b6e40e34ca12f248b317813 /inputmethods/dasher/SettingsStore.cpp
parentd17b9f7b64e004dcc301866f8122171218553b42 (diff)
downloadopie-028717962deec0c2ff0e382221cbc2242393b79e.zip
opie-028717962deec0c2ff0e382221cbc2242393b79e.tar.gz
opie-028717962deec0c2ff0e382221cbc2242393b79e.tar.bz2
Removed warnings about initialization sequence in constructores
and unused variables and arguments
Diffstat (limited to 'inputmethods/dasher/SettingsStore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/SettingsStore.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/inputmethods/dasher/SettingsStore.cpp b/inputmethods/dasher/SettingsStore.cpp
index c5bbfea..f7661bd 100644
--- a/inputmethods/dasher/SettingsStore.cpp
+++ b/inputmethods/dasher/SettingsStore.cpp
@@ -9,127 +9,127 @@
#include "SettingsStore.h"
using namespace std;
/* TODO: Consider using Template functions to make this neater. */
bool CSettingsStore::GetBoolOption(const string& Key)
{
if (BoolMap.find(Key)==BoolMap.end()) {
bool Value = false;
LoadSetting(Key, &Value);
BoolMap[Key] = Value;
}
return BoolMap[Key];
}
long CSettingsStore::GetLongOption(const string& Key)
{
if (LongMap.find(Key)==LongMap.end()) {
long Value = 0l;
LoadSetting(Key, &Value);
LongMap[Key] = Value;
}
return LongMap[Key];
}
string& CSettingsStore::GetStringOption(const string& Key)
{
if (StringMap.find(Key)==StringMap.end()) {
string Value = "";
LoadSetting(Key, &Value);
StringMap[Key] = Value;
}
return StringMap[Key];
}
void CSettingsStore::SetBoolOption(const string& Key, bool Value)
{
BoolMap[Key] = Value;
SaveSetting(Key, Value);
}
void CSettingsStore::SetLongOption(const string& Key, long Value)
{
LongMap[Key] = Value;
SaveSetting(Key, Value);
}
void CSettingsStore::SetStringOption(const string& Key, const string& Value)
{
StringMap[Key] = Value;
SaveSetting(Key, Value);
}
void CSettingsStore::SetBoolDefault(const string& Key, bool Value)
{
bool TmpValue;
if ( (BoolMap.find(Key)==BoolMap.end()) && (!LoadSetting(Key, &TmpValue)) )
SetBoolOption(Key, Value);
}
void CSettingsStore::SetLongDefault(const string& Key, long Value)
{
long TmpValue;
if ( (LongMap.find(Key)==LongMap.end()) && (!LoadSetting(Key, &TmpValue)) )
SetLongOption(Key, Value);
}
void CSettingsStore::SetStringDefault(const string& Key, const string& Value)
{
string TmpValue;
if ( (StringMap.find(Key)==StringMap.end()) && (!LoadSetting(Key, &TmpValue)) )
SetStringOption(Key, Value);
}
/* Private functions -- Settings are not saved between sessions unless these
functions are over-ridden.
--------------------------------------------------------------------------*/
-bool CSettingsStore::LoadSetting(const string& Key, bool* Value)
+bool CSettingsStore::LoadSetting(const string& , bool* )
{
return false;
}
-bool CSettingsStore::LoadSetting(const string& Key, long* Value)
+bool CSettingsStore::LoadSetting(const string& , long* )
{
return false;
}
-bool CSettingsStore::LoadSetting(const string& Key, string* Value)
+bool CSettingsStore::LoadSetting(const string& , string* )
{
return false;
}
-void CSettingsStore::SaveSetting(const string& Key, bool Value)
+void CSettingsStore::SaveSetting(const string& , bool )
{
}
-void CSettingsStore::SaveSetting(const string& Key, long Value)
+void CSettingsStore::SaveSetting(const string& , long )
{
}
-void CSettingsStore::SaveSetting(const string& Key, const string& Value)
+void CSettingsStore::SaveSetting(const string& , const string& )
{
}