From 04a05dfd23ff9ab42270b7690cf0cd472068bbf1 Mon Sep 17 00:00:00 2001 From: alexzhornyak Date: Wed, 28 Jun 2017 20:58:20 +0300 Subject: Fixes issue #147 Fixes bug with Invoking callback message --- src/uscxml/interpreter/BasicContentExecutor.cpp | 4 ++-- src/uscxml/util/Convenience.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/uscxml/interpreter/BasicContentExecutor.cpp b/src/uscxml/interpreter/BasicContentExecutor.cpp index 8d278ec..fb6f52e 100644 --- a/src/uscxml/interpreter/BasicContentExecutor.cpp +++ b/src/uscxml/interpreter/BasicContentExecutor.cpp @@ -501,9 +501,9 @@ void BasicContentExecutor::invoke(XERCESC_NS::DOMElement* element) { finalize = finalizes.front(); } - USCXML_MONITOR_CALLBACK2(_callbacks->getMonitors(), beforeUninvoking, element, invokeEvent.invokeid); + USCXML_MONITOR_CALLBACK2(_callbacks->getMonitors(), beforeInvoking, element, invokeEvent.invokeid); _callbacks->invoke(type, source, autoForward, finalize, invokeEvent); - USCXML_MONITOR_CALLBACK2(_callbacks->getMonitors(), afterUninvoking, element, invokeEvent.invokeid); + USCXML_MONITOR_CALLBACK2(_callbacks->getMonitors(), afterInvoking, element, invokeEvent.invokeid); } void BasicContentExecutor::uninvoke(XERCESC_NS::DOMElement* invoke) { diff --git a/src/uscxml/util/Convenience.h b/src/uscxml/util/Convenience.h index 35abf12..e3bdb9e 100644 --- a/src/uscxml/util/Convenience.h +++ b/src/uscxml/util/Convenience.h @@ -32,6 +32,7 @@ inline bool isnan(double x); template std::string toStr(T tmp) { std::ostringstream outSS; outSS.precision(std::numeric_limits::digits10 + 1); + outSS.imbue(std::locale("C")); outSS << tmp; return outSS.str(); } @@ -39,6 +40,7 @@ template std::string toStr(T tmp) { template T strTo(std::string tmp) { T output; std::istringstream in(tmp); + in.imbue(std::locale("C")); in >> output; return output; } -- cgit v0.12