diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-26 23:47:24 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-26 23:47:24 (GMT) |
commit | 45ba8b93098f4f64a2dbc1e0a4c15c5ddb1d6559 (patch) | |
tree | c82a47a2dfb417bb5f0305254f45fa84d69e0a57 /src/uscxml/plugins/element/file/FileElement.cpp | |
parent | cb4356f33044fd42958cdede5dfe93ef4516173a (diff) | |
download | uscxml-45ba8b93098f4f64a2dbc1e0a4c15c5ddb1d6559.zip uscxml-45ba8b93098f4f64a2dbc1e0a4c15c5ddb1d6559.tar.gz uscxml-45ba8b93098f4f64a2dbc1e0a4c15c5ddb1d6559.tar.bz2 |
Performance: replaced boost::iequals for strings by inline function
Diffstat (limited to 'src/uscxml/plugins/element/file/FileElement.cpp')
-rw-r--r-- | src/uscxml/plugins/element/file/FileElement.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/uscxml/plugins/element/file/FileElement.cpp b/src/uscxml/plugins/element/file/FileElement.cpp index 8a2ca8f..346c75d 100644 --- a/src/uscxml/plugins/element/file/FileElement.cpp +++ b/src/uscxml/plugins/element/file/FileElement.cpp @@ -55,17 +55,17 @@ void FileElement::enterElement(const Arabica::DOM::Node<std::string>& node) { _givenUrl = (HAS_ATTR(node, "url") ? ATTR(node, "url") : _interpreter->getDataModel().evalAsString(ATTR(node, "urlexpr"))); std::string sandBoxStr = (HAS_ATTR(node, "sandbox") ? ATTR(node, "sandbox") : "on"); - if (boost::iequals(sandBoxStr, "off") || boost::iequals(sandBoxStr, "false") || boost::iequals(sandBoxStr, "no")) { + if (iequals(sandBoxStr, "off") || iequals(sandBoxStr, "false") || iequals(sandBoxStr, "no")) { _sandBoxed = false; } if (HAS_ATTR(node, "operation")) { std::string operation = ATTR(node, "operation"); - if (boost::iequals(operation, "read") || boost::iequals(operation, "load")) { + if (iequals(operation, "read") || iequals(operation, "load")) { _operation = READ; - } else if(boost::iequals(operation, "write")) { + } else if(iequals(operation, "write")) { _operation = WRITE; - } else if(boost::iequals(operation, "append")) { + } else if(iequals(operation, "append")) { _operation = APPEND; } else { LOG(ERROR) << "File element operation attribute not one of read, write or append."; @@ -112,13 +112,13 @@ void FileElement::enterElement(const Arabica::DOM::Node<std::string>& node) { } else if(HAS_ATTR(node, "typeexpr")) { type = _interpreter->getDataModel().evalAsString(ATTR(node, "typeexpr")); } - if (boost::iequals(type, "text")) { + if (iequals(type, "text")) { _type = TEXT; - } else if (boost::iequals(type, "json")) { + } else if (iequals(type, "json")) { _type = JSON; - } else if (boost::iequals(type, "binary")) { + } else if (iequals(type, "binary")) { _type = BINARY; - } else if(boost::iequals(type, "xml")) { + } else if(iequals(type, "xml")) { _type = XML; } else { LOG(ERROR) << "File element type attribute not one of text, json, xml or binary."; |