aboutsummaryrefslogtreecommitdiff
path: root/src/Slit.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-05-23 10:25:47 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-05-23 10:25:47 (GMT)
commitfbcdd34b223174a28ff712b7d03e56339fa2fe07 (patch)
treeda036effaeeb5ba7788f4b0403151aa864e9d16d /src/Slit.cc
parentff9c68e247704bd1522ea7a2055b7fa4b2b0c568 (diff)
downloadfluxbox-fbcdd34b223174a28ff712b7d03e56339fa2fe07.zip
fluxbox-fbcdd34b223174a28ff712b7d03e56339fa2fe07.tar.bz2
mostly cosmetic fixes, mainly discovered by 'clang --analyze'
reordering of Resource-related stuff was because of "error: explicit specialization of 'getString' after instantiation" complaints.
Diffstat (limited to 'src/Slit.cc')
-rw-r--r--src/Slit.cc60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index fb3da30..7aaa096 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -90,36 +90,6 @@ using std::dec;
90namespace FbTk { 90namespace FbTk {
91 91
92template<> 92template<>
93void FbTk::Resource<Slit::Placement>::setFromString(const char *strval) {
94 if (strcasecmp(strval, "TopLeft")==0)
95 m_value = Slit::TOPLEFT;
96 else if (strcasecmp(strval, "LeftCenter")==0)
97 m_value = Slit::LEFTCENTER;
98 else if (strcasecmp(strval, "BottomLeft")==0)
99 m_value = Slit::BOTTOMLEFT;
100 else if (strcasecmp(strval, "TopCenter")==0)
101 m_value = Slit::TOPCENTER;
102 else if (strcasecmp(strval, "BottomCenter")==0)
103 m_value = Slit::BOTTOMCENTER;
104 else if (strcasecmp(strval, "TopRight")==0)
105 m_value = Slit::TOPRIGHT;
106 else if (strcasecmp(strval, "RightCenter")==0)
107 m_value = Slit::RIGHTCENTER;
108 else if (strcasecmp(strval, "BottomRight")==0)
109 m_value = Slit::BOTTOMRIGHT;
110 else if (strcasecmp(strval, "LeftTop")==0)
111 m_value = Slit::LEFTTOP;
112 else if (strcasecmp(strval, "LeftBottom")==0)
113 m_value = Slit::LEFTBOTTOM;
114 else if (strcasecmp(strval, "RightTop")==0)
115 m_value = Slit::RIGHTTOP;
116 else if (strcasecmp(strval, "RightBottom")==0)
117 m_value = Slit::RIGHTBOTTOM;
118 else
119 setDefaultValue();
120}
121
122template<>
123string FbTk::Resource<Slit::Placement>::getString() const { 93string FbTk::Resource<Slit::Placement>::getString() const {
124 switch (m_value) { 94 switch (m_value) {
125 case Slit::TOPLEFT: 95 case Slit::TOPLEFT:
@@ -163,6 +133,36 @@ string FbTk::Resource<Slit::Placement>::getString() const {
163 return string("RightBottom"); 133 return string("RightBottom");
164} 134}
165 135
136template<>
137void FbTk::Resource<Slit::Placement>::setFromString(const char *strval) {
138 if (strcasecmp(strval, "TopLeft")==0)
139 m_value = Slit::TOPLEFT;
140 else if (strcasecmp(strval, "LeftCenter")==0)
141 m_value = Slit::LEFTCENTER;
142 else if (strcasecmp(strval, "BottomLeft")==0)
143 m_value = Slit::BOTTOMLEFT;
144 else if (strcasecmp(strval, "TopCenter")==0)
145 m_value = Slit::TOPCENTER;
146 else if (strcasecmp(strval, "BottomCenter")==0)
147 m_value = Slit::BOTTOMCENTER;
148 else if (strcasecmp(strval, "TopRight")==0)
149 m_value = Slit::TOPRIGHT;
150 else if (strcasecmp(strval, "RightCenter")==0)
151 m_value = Slit::RIGHTCENTER;
152 else if (strcasecmp(strval, "BottomRight")==0)
153 m_value = Slit::BOTTOMRIGHT;
154 else if (strcasecmp(strval, "LeftTop")==0)
155 m_value = Slit::LEFTTOP;
156 else if (strcasecmp(strval, "LeftBottom")==0)
157 m_value = Slit::LEFTBOTTOM;
158 else if (strcasecmp(strval, "RightTop")==0)
159 m_value = Slit::RIGHTTOP;
160 else if (strcasecmp(strval, "RightBottom")==0)
161 m_value = Slit::RIGHTBOTTOM;
162 else
163 setDefaultValue();
164}
165
166} // end namespace FbTk 166} // end namespace FbTk
167namespace { 167namespace {
168 168