aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/StringUtil.hh6
-rw-r--r--src/FbTk/Timer.cc2
2 files changed, 1 insertions, 7 deletions
diff --git a/src/FbTk/StringUtil.hh b/src/FbTk/StringUtil.hh
index 930e0b5..bc17158 100644
--- a/src/FbTk/StringUtil.hh
+++ b/src/FbTk/StringUtil.hh
@@ -94,12 +94,6 @@ std::string::size_type removeTrailingWhitespace(std::string &str);
94/// splits input at first non-leading whitespace and returns both parts 94/// splits input at first non-leading whitespace and returns both parts
95void getFirstWord(const std::string &in, std::string &first, std::string &rest); 95void getFirstWord(const std::string &in, std::string &first, std::string &rest);
96 96
97template <typename T>
98void fromString(const char *in, T &out) {
99 FbTk_istringstream iss(in);
100 iss >> out;
101}
102
103template <typename Container> 97template <typename Container>
104static void stringTokensBetween(Container &container, const std::string &in, 98static void stringTokensBetween(Container &container, const std::string &in,
105 std::string &rest, char first, char last, 99 std::string &rest, char first, char last,
diff --git a/src/FbTk/Timer.cc b/src/FbTk/Timer.cc
index 61875f7..05d938b 100644
--- a/src/FbTk/Timer.cc
+++ b/src/FbTk/Timer.cc
@@ -239,7 +239,7 @@ Command<void> *DelayedCmd::parse(const std::string &command,
239 return 0; 239 return 0;
240 240
241 uint64_t delay = 200; 241 uint64_t delay = 200;
242 StringUtil::fromString<uint64_t>(args.c_str() + err, delay); 242 StringUtil::extractNumber(args.c_str() + err, delay);
243 243
244 return new DelayedCmd(cmd, delay); 244 return new DelayedCmd(cmd, delay);
245} 245}