diff options
author | John Langford <jl@hunch.net> | 2012-06-20 23:01:32 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2012-06-20 23:01:32 +0400 |
commit | a572a38b66b4348717fd18d8b90bc243a6ab0277 (patch) | |
tree | a7b708b13800cd872c41f651ac5bae9f3cb293de /vowpalwabbit/parse_primitives.h | |
parent | c2bd69b99dcd41516edaff9a4460a1c73b6725e7 (diff) |
dead code removal and minor tweak
Diffstat (limited to 'vowpalwabbit/parse_primitives.h')
-rw-r--r-- | vowpalwabbit/parse_primitives.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/vowpalwabbit/parse_primitives.h b/vowpalwabbit/parse_primitives.h index 0ed374eb..73afc3ae 100644 --- a/vowpalwabbit/parse_primitives.h +++ b/vowpalwabbit/parse_primitives.h @@ -158,31 +158,9 @@ inline float float_of_substring(substring s) return f; } -inline float double_of_substring(substring s) -{ - char* endptr = s.end; - float f = strtod(s.begin,&endptr); - if (endptr == s.begin && s.begin != s.end) - { - std::cout << "error: " << std::string(s.begin, s.end-s.begin).c_str() << " is not a double" << std::endl; - f = 0; - } - return f; -} - inline int int_of_substring(substring s) { return atoi(std::string(s.begin, s.end-s.begin).c_str()); } -inline unsigned long ulong_of_substring(substring s) -{ - return strtoul(std::string(s.begin, s.end-s.begin).c_str(),NULL,10); -} - -inline unsigned long ss_length(substring s) -{ - return (s.end - s.begin); -} - #endif |