diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-07-26 19:05:33 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-07-26 19:05:33 (GMT) |
commit | 720bbe5c1b8c0789b5c7ad9ffca33e52bf77f1da (patch) | |
tree | 8f692eb636ddb21649097e053f8504a2dab70a01 /src/uscxml/Factory.h | |
parent | 8ff01ac995c8b95fa2695b6ff7e3e985bd4579d6 (diff) | |
download | uscxml-720bbe5c1b8c0789b5c7ad9ffca33e52bf77f1da.zip uscxml-720bbe5c1b8c0789b5c7ad9ffca33e52bf77f1da.tar.gz uscxml-720bbe5c1b8c0789b5c7ad9ffca33e52bf77f1da.tar.bz2 |
Started calendar invoker and bug fixes
Diffstat (limited to 'src/uscxml/Factory.h')
-rw-r--r-- | src/uscxml/Factory.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/uscxml/Factory.h b/src/uscxml/Factory.h index 9507d07..58002fe 100644 --- a/src/uscxml/Factory.h +++ b/src/uscxml/Factory.h @@ -14,6 +14,10 @@ namespace uscxml { +inline bool isnan(double x) { + return x != x; +} + // see http://stackoverflow.com/questions/228005/alternative-to-itoa-for-converting-integer-to-string-c template <typename T> std::string toStr(T tmp) { std::ostringstream out; @@ -30,9 +34,9 @@ template <typename T> T strTo(std::string tmp) { } inline bool isNumeric( const char* pszInput, int nNumberBase) { - std::string base = ".0123456789ABCDEF"; + std::string base = ".-0123456789ABCDEF"; std::string input = pszInput; - return (input.find_first_not_of(base.substr(0, nNumberBase + 1)) == std::string::npos); + return (input.find_first_not_of(base.substr(0, nNumberBase + 2)) == std::string::npos); } class InterpreterImpl; |