aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/ResTraits.hh
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-16 19:31:28 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-11-01 09:57:19 (GMT)
commit49ad95dd5fd6b6472c7048b155038721a2ea06ad (patch)
treea33c25de364e9baf8fe53f63322a6e855ae144dd /src/FbTk/ResTraits.hh
parent7d0fad978e7f6026ea8bbf076df45442862e8086 (diff)
downloadfluxbox_pavel-49ad95dd5fd6b6472c7048b155038721a2ea06ad.zip
fluxbox_pavel-49ad95dd5fd6b6472c7048b155038721a2ea06ad.tar.bz2
Vector resources can now specify which char to use as delimiters
when saving/loading to/from string representation. This is needed for the next commit.
Diffstat (limited to 'src/FbTk/ResTraits.hh')
-rw-r--r--src/FbTk/ResTraits.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/ResTraits.hh b/src/FbTk/ResTraits.hh
index 3ee4464..3284801 100644
--- a/src/FbTk/ResTraits.hh
+++ b/src/FbTk/ResTraits.hh
@@ -160,7 +160,7 @@ struct EnumTraits {
160 } 160 }
161}; 161};
162 162
163template<typename Traits> 163template<typename Traits, const char *delim>
164struct VectorTraits { 164struct VectorTraits {
165 typedef std::vector<typename Traits::Type> Type; 165 typedef std::vector<typename Traits::Type> Type;
166 static std::string toString(const Type &x) { 166 static std::string toString(const Type &x) {
@@ -186,7 +186,7 @@ struct VectorTraits {
186 186
187 static Type fromString(const std::string &x) { 187 static Type fromString(const std::string &x) {
188 std::vector<std::string> val; 188 std::vector<std::string> val;
189 StringUtil::stringtok(val, x); 189 StringUtil::stringtok(val, x, delim);
190 Type retval; 190 Type retval;
191 191
192 for(size_t i = 0; i < val.size(); i++) { 192 for(size_t i = 0; i < val.size(); i++) {