summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-06-13 13:42:26 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-06-13 13:42:26 (GMT)
commitd6602a2aab1dc00663bd64759f12935283b58076 (patch)
tree0dc8a7c705da22dc39939d23192e0f56639bc45d /src
parent07395f2766d70c55f51674dc3027d7b19a4ccc26 (diff)
downloaduscxml-d6602a2aab1dc00663bd64759f12935283b58076.zip
uscxml-d6602a2aab1dc00663bd64759f12935283b58076.tar.gz
uscxml-d6602a2aab1dc00663bd64759f12935283b58076.tar.bz2
Fixed issue84
Diffstat (limited to 'src')
-rw-r--r--src/uscxml/Common.h4
-rw-r--r--src/uscxml/Interpreter.h2
-rw-r--r--src/uscxml/interpreter/BasicEventQueue.cpp6
-rw-r--r--src/uscxml/interpreter/BasicEventQueue.h1
4 files changed, 8 insertions, 5 deletions
diff --git a/src/uscxml/Common.h b/src/uscxml/Common.h
index c1029f1..d1f42c7 100644
--- a/src/uscxml/Common.h
+++ b/src/uscxml/Common.h
@@ -20,7 +20,9 @@
#ifndef COMMON_H_YZ3CIYP
#define COMMON_H_YZ3CIYP
+#ifndef _MSC_VER
#define ELPP_STACKTRACE_ON_CRASH 1
+#endif
#if __cplusplus >= 201402L
#define DEPRECATED [[deprecated]]
@@ -44,6 +46,8 @@
#endif
#ifdef _WIN32
+#define NOMINMAX
+
typedef unsigned __int32 uint32_t;
// see http://stackoverflow.com/questions/1372480/c-redefinition-header-files
diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h
index bab0ebc..365289f 100644
--- a/src/uscxml/Interpreter.h
+++ b/src/uscxml/Interpreter.h
@@ -166,7 +166,7 @@ public:
* @param blockMs The maximum duration in milli-seconds to wait for an event to become available.
* @return The new state of the interpreter object.
*/
- InterpreterState step(size_t blockMs = std::numeric_limits<size_t>::max());
+ InterpreterState step(size_t blockMs = (std::numeric_limits<size_t>::max)());
/**
* Unblock and mark for finalize.
diff --git a/src/uscxml/interpreter/BasicEventQueue.cpp b/src/uscxml/interpreter/BasicEventQueue.cpp
index 7309392..d484ada 100644
--- a/src/uscxml/interpreter/BasicEventQueue.cpp
+++ b/src/uscxml/interpreter/BasicEventQueue.cpp
@@ -39,9 +39,9 @@ Event BasicEventQueue::dequeue(size_t blockMs) {
// block for given milliseconds or until queue is filled
std::chrono::time_point<std::chrono::system_clock> updated, now;
std::chrono::milliseconds remain;
-
- if (blockMs > std::chrono::system_clock::duration::max().count()) {
- blockMs = std::chrono::system_clock::duration::max().count();
+
+ if (blockMs > (std::chrono::system_clock::duration::max)().count()) {
+ blockMs = (std::chrono::system_clock::duration::max)().count();
}
updated = now = std::chrono::system_clock::now();
diff --git a/src/uscxml/interpreter/BasicEventQueue.h b/src/uscxml/interpreter/BasicEventQueue.h
index 15a1c3c..a6374d8 100644
--- a/src/uscxml/interpreter/BasicEventQueue.h
+++ b/src/uscxml/interpreter/BasicEventQueue.h
@@ -20,7 +20,6 @@
#ifndef BASICEVENTQUEUE_H_39DCC18B
#define BASICEVENTQUEUE_H_39DCC18B
-
#include "EventQueueImpl.h"
#include <string>
#include <map>