diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-05-23 10:25:47 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-05-23 10:25:47 (GMT) |
commit | fbcdd34b223174a28ff712b7d03e56339fa2fe07 (patch) | |
tree | da036effaeeb5ba7788f4b0403151aa864e9d16d /src/Screen.cc | |
parent | ff9c68e247704bd1522ea7a2055b7fa4b2b0c568 (diff) | |
download | fluxbox-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/Screen.cc')
-rw-r--r-- | src/Screen.cc | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index c2929d0..b712b81 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -209,37 +209,6 @@ private: | |||
209 | namespace FbTk { | 209 | namespace FbTk { |
210 | 210 | ||
211 | template<> | 211 | template<> |
212 | void FbTk::Resource<FbWinFrame::TabPlacement>:: | ||
213 | setFromString(const char *strval) { | ||
214 | if (strcasecmp(strval, "TopLeft") == 0) | ||
215 | m_value = FbWinFrame::TOPLEFT; | ||
216 | else if (strcasecmp(strval, "BottomLeft") == 0) | ||
217 | m_value = FbWinFrame::BOTTOMLEFT; | ||
218 | else if (strcasecmp(strval, "Top") == 0) | ||
219 | m_value = FbWinFrame::TOP; | ||
220 | else if (strcasecmp(strval, "Bottom") == 0) | ||
221 | m_value = FbWinFrame::BOTTOM; | ||
222 | else if (strcasecmp(strval, "TopRight") == 0) | ||
223 | m_value = FbWinFrame::TOPRIGHT; | ||
224 | else if (strcasecmp(strval, "BottomRight") == 0) | ||
225 | m_value = FbWinFrame::BOTTOMRIGHT; | ||
226 | else if (strcasecmp(strval, "LeftTop") == 0) | ||
227 | m_value = FbWinFrame::LEFTTOP; | ||
228 | else if (strcasecmp(strval, "Left") == 0) | ||
229 | m_value = FbWinFrame::LEFT; | ||
230 | else if (strcasecmp(strval, "LeftBottom") == 0) | ||
231 | m_value = FbWinFrame::LEFTBOTTOM; | ||
232 | else if (strcasecmp(strval, "RightTop") == 0) | ||
233 | m_value = FbWinFrame::RIGHTTOP; | ||
234 | else if (strcasecmp(strval, "Right") == 0) | ||
235 | m_value = FbWinFrame::RIGHT; | ||
236 | else if (strcasecmp(strval, "RightBottom") == 0) | ||
237 | m_value = FbWinFrame::RIGHTBOTTOM; | ||
238 | else | ||
239 | setDefaultValue(); | ||
240 | } | ||
241 | |||
242 | template<> | ||
243 | string FbTk::Resource<FbWinFrame::TabPlacement>:: | 212 | string FbTk::Resource<FbWinFrame::TabPlacement>:: |
244 | getString() const { | 213 | getString() const { |
245 | switch (m_value) { | 214 | switch (m_value) { |
@@ -283,6 +252,38 @@ getString() const { | |||
283 | //default string | 252 | //default string |
284 | return string("TopLeft"); | 253 | return string("TopLeft"); |
285 | } | 254 | } |
255 | |||
256 | template<> | ||
257 | void FbTk::Resource<FbWinFrame::TabPlacement>:: | ||
258 | setFromString(const char *strval) { | ||
259 | if (strcasecmp(strval, "TopLeft") == 0) | ||
260 | m_value = FbWinFrame::TOPLEFT; | ||
261 | else if (strcasecmp(strval, "BottomLeft") == 0) | ||
262 | m_value = FbWinFrame::BOTTOMLEFT; | ||
263 | else if (strcasecmp(strval, "Top") == 0) | ||
264 | m_value = FbWinFrame::TOP; | ||
265 | else if (strcasecmp(strval, "Bottom") == 0) | ||
266 | m_value = FbWinFrame::BOTTOM; | ||
267 | else if (strcasecmp(strval, "TopRight") == 0) | ||
268 | m_value = FbWinFrame::TOPRIGHT; | ||
269 | else if (strcasecmp(strval, "BottomRight") == 0) | ||
270 | m_value = FbWinFrame::BOTTOMRIGHT; | ||
271 | else if (strcasecmp(strval, "LeftTop") == 0) | ||
272 | m_value = FbWinFrame::LEFTTOP; | ||
273 | else if (strcasecmp(strval, "Left") == 0) | ||
274 | m_value = FbWinFrame::LEFT; | ||
275 | else if (strcasecmp(strval, "LeftBottom") == 0) | ||
276 | m_value = FbWinFrame::LEFTBOTTOM; | ||
277 | else if (strcasecmp(strval, "RightTop") == 0) | ||
278 | m_value = FbWinFrame::RIGHTTOP; | ||
279 | else if (strcasecmp(strval, "Right") == 0) | ||
280 | m_value = FbWinFrame::RIGHT; | ||
281 | else if (strcasecmp(strval, "RightBottom") == 0) | ||
282 | m_value = FbWinFrame::RIGHTBOTTOM; | ||
283 | else | ||
284 | setDefaultValue(); | ||
285 | } | ||
286 | |||
286 | } // end namespace FbTk | 287 | } // end namespace FbTk |
287 | 288 | ||
288 | 289 | ||