diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-07-05 11:35:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-05 11:35:04 (GMT) |
commit | cb2f533085542a753fc45d17fdb09396c46fbadc (patch) | |
tree | 66d378d1df7cb82834e944a1f37865809abf75ae /src/uscxml/interpreter/InterpreterImpl.cpp | |
parent | 3f10e11d6ad2b97fee4aee6e09bc959ba9b8e0e5 (diff) | |
parent | a0f96c5dd050c524223ac644ba8798bc7cc80bfd (diff) | |
download | uscxml-cb2f533085542a753fc45d17fdb09396c46fbadc.zip uscxml-cb2f533085542a753fc45d17fdb09396c46fbadc.tar.gz uscxml-cb2f533085542a753fc45d17fdb09396c46fbadc.tar.bz2 |
Merge pull request #155 from tklab-tud/sradomski
More performant monitors with slight API break
Diffstat (limited to 'src/uscxml/interpreter/InterpreterImpl.cpp')
-rw-r--r-- | src/uscxml/interpreter/InterpreterImpl.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/uscxml/interpreter/InterpreterImpl.cpp b/src/uscxml/interpreter/InterpreterImpl.cpp index 00fbf41..9e59cea 100644 --- a/src/uscxml/interpreter/InterpreterImpl.cpp +++ b/src/uscxml/interpreter/InterpreterImpl.cpp @@ -338,15 +338,15 @@ void InterpreterImpl::init() { // try to open chached data from resource directory std::string sharedTemp = URL::getTempDir(true); std::ifstream dataFS(sharedTemp + PATH_SEPERATOR + md5(_baseURL) + ".uscxml.cache"); - try { - if (dataFS.is_open()) { - std::string cacheStr((std::istreambuf_iterator<char>(dataFS)), - std::istreambuf_iterator<char>()); - _cache = Data::fromJSON(cacheStr); - } - } catch (...) { - remove(std::string(sharedTemp + PATH_SEPERATOR + md5(_baseURL) + ".uscxml.cache").c_str()); - } + try { + if (dataFS.is_open()) { + std::string cacheStr((std::istreambuf_iterator<char>(dataFS)), + std::istreambuf_iterator<char>()); + _cache = Data::fromJSON(cacheStr); + } + } catch (...) { + remove(std::string(sharedTemp + PATH_SEPERATOR + md5(_baseURL) + ".uscxml.cache").c_str()); + } // get md5 of current document std::stringstream ss; @@ -390,7 +390,7 @@ void InterpreterImpl::init() { } if (!_microStepper) { - _microStepper = MicroStep(std::shared_ptr<MicroStepImpl>(new LargeMicroStep(this))); + _microStepper = MicroStep(std::shared_ptr<MicroStepImpl>(new FastMicroStep(this))); } _microStepper.init(_scxml); |