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) (unidiff)
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 @@
9 9
10 10
11 11
12#include "SettingsStore.h" 12#include "SettingsStore.h"
13 13
14using namespace std; 14using namespace std;
15 15
16/* TODO: Consider using Template functions to make this neater. */ 16/* TODO: Consider using Template functions to make this neater. */
17 17
18 18
19bool CSettingsStore::GetBoolOption(const string& Key) 19bool CSettingsStore::GetBoolOption(const string& Key)
20{ 20{
21 if (BoolMap.find(Key)==BoolMap.end()) { 21 if (BoolMap.find(Key)==BoolMap.end()) {
22 bool Value = false; 22 bool Value = false;
23 LoadSetting(Key, &Value); 23 LoadSetting(Key, &Value);
24 BoolMap[Key] = Value; 24 BoolMap[Key] = Value;
25 } 25 }
26 26
27 return BoolMap[Key]; 27 return BoolMap[Key];
28} 28}
29 29
30 30
31long CSettingsStore::GetLongOption(const string& Key) 31long CSettingsStore::GetLongOption(const string& Key)
32{ 32{
33 if (LongMap.find(Key)==LongMap.end()) { 33 if (LongMap.find(Key)==LongMap.end()) {
34 long Value = 0l; 34 long Value = 0l;
35 LoadSetting(Key, &Value); 35 LoadSetting(Key, &Value);
36 LongMap[Key] = Value; 36 LongMap[Key] = Value;
37 } 37 }
38 38
39 return LongMap[Key]; 39 return LongMap[Key];
40} 40}
41 41
42 42
43string& CSettingsStore::GetStringOption(const string& Key) 43string& CSettingsStore::GetStringOption(const string& Key)
44{ 44{
45 if (StringMap.find(Key)==StringMap.end()) { 45 if (StringMap.find(Key)==StringMap.end()) {
46 string Value = ""; 46 string Value = "";
47 LoadSetting(Key, &Value); 47 LoadSetting(Key, &Value);
48 StringMap[Key] = Value; 48 StringMap[Key] = Value;
49 } 49 }
50 50
51 return StringMap[Key]; 51 return StringMap[Key];
52} 52}
53 53
54 54
55void CSettingsStore::SetBoolOption(const string& Key, bool Value) 55void CSettingsStore::SetBoolOption(const string& Key, bool Value)
56{ 56{
57 BoolMap[Key] = Value; 57 BoolMap[Key] = Value;
58 SaveSetting(Key, Value); 58 SaveSetting(Key, Value);
59} 59}
60 60
61 61
62void CSettingsStore::SetLongOption(const string& Key, long Value) 62void CSettingsStore::SetLongOption(const string& Key, long Value)
63{ 63{
64 LongMap[Key] = Value; 64 LongMap[Key] = Value;
65 SaveSetting(Key, Value); 65 SaveSetting(Key, Value);
66} 66}
67 67
68 68
69void CSettingsStore::SetStringOption(const string& Key, const string& Value) 69void CSettingsStore::SetStringOption(const string& Key, const string& Value)
70{ 70{
71 StringMap[Key] = Value; 71 StringMap[Key] = Value;
72 SaveSetting(Key, Value); 72 SaveSetting(Key, Value);
73} 73}
74 74
75 75
76void CSettingsStore::SetBoolDefault(const string& Key, bool Value) 76void CSettingsStore::SetBoolDefault(const string& Key, bool Value)
77{ 77{
78 bool TmpValue; 78 bool TmpValue;
79 if ( (BoolMap.find(Key)==BoolMap.end()) && (!LoadSetting(Key, &TmpValue)) ) 79 if ( (BoolMap.find(Key)==BoolMap.end()) && (!LoadSetting(Key, &TmpValue)) )
80 SetBoolOption(Key, Value); 80 SetBoolOption(Key, Value);
81} 81}
82 82
83 83
84void CSettingsStore::SetLongDefault(const string& Key, long Value) 84void CSettingsStore::SetLongDefault(const string& Key, long Value)
85{ 85{
86 long TmpValue; 86 long TmpValue;
87 if ( (LongMap.find(Key)==LongMap.end()) && (!LoadSetting(Key, &TmpValue)) ) 87 if ( (LongMap.find(Key)==LongMap.end()) && (!LoadSetting(Key, &TmpValue)) )
88 SetLongOption(Key, Value); 88 SetLongOption(Key, Value);
89} 89}
90 90
91 91
92void CSettingsStore::SetStringDefault(const string& Key, const string& Value) 92void CSettingsStore::SetStringDefault(const string& Key, const string& Value)
93{ 93{
94 string TmpValue; 94 string TmpValue;
95 if ( (StringMap.find(Key)==StringMap.end()) && (!LoadSetting(Key, &TmpValue)) ) 95 if ( (StringMap.find(Key)==StringMap.end()) && (!LoadSetting(Key, &TmpValue)) )
96 SetStringOption(Key, Value); 96 SetStringOption(Key, Value);
97} 97}
98 98
99 99
100/* Private functions -- Settings are not saved between sessions unless these 100/* Private functions -- Settings are not saved between sessions unless these
101functions are over-ridden. 101functions are over-ridden.
102--------------------------------------------------------------------------*/ 102--------------------------------------------------------------------------*/
103 103
104 104
105bool CSettingsStore::LoadSetting(const string& Key, bool* Value) 105bool CSettingsStore::LoadSetting(const string& , bool* )
106{ 106{
107 return false; 107 return false;
108} 108}
109 109
110 110
111bool CSettingsStore::LoadSetting(const string& Key, long* Value) 111bool CSettingsStore::LoadSetting(const string& , long* )
112{ 112{
113 return false; 113 return false;
114} 114}
115 115
116 116
117bool CSettingsStore::LoadSetting(const string& Key, string* Value) 117bool CSettingsStore::LoadSetting(const string& , string* )
118{ 118{
119 return false; 119 return false;
120} 120}
121 121
122 122
123void CSettingsStore::SaveSetting(const string& Key, bool Value) 123void CSettingsStore::SaveSetting(const string& , bool )
124{ 124{
125} 125}
126 126
127 127
128void CSettingsStore::SaveSetting(const string& Key, long Value) 128void CSettingsStore::SaveSetting(const string& , long )
129{ 129{
130} 130}
131 131
132 132
133void CSettingsStore::SaveSetting(const string& Key, const string& Value) 133void CSettingsStore::SaveSetting(const string& , const string& )
134{ 134{
135} 135}