summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Sluift/ElementConvertors/DOMElementConvertor.cpp2
-rw-r--r--Swift/Controllers/Chat/ChatMessageParser.cpp4
-rw-r--r--Swiften/Parser/BOSHBodyExtractor.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/Sluift/ElementConvertors/DOMElementConvertor.cpp b/Sluift/ElementConvertors/DOMElementConvertor.cpp
index 72474bb..b957686 100644
--- a/Sluift/ElementConvertors/DOMElementConvertor.cpp
+++ b/Sluift/ElementConvertors/DOMElementConvertor.cpp
@@ -185,7 +185,7 @@ boost::optional<std::string> DOMElementConvertor::convertToLua(
// Parse the payload again
ParserClient parserClient(L);
- std::shared_ptr<XMLParser> parser(std::move(parsers.createXMLParser(&parserClient)));
+ std::shared_ptr<XMLParser> parser(parsers.createXMLParser(&parserClient));
bool result = parser->parse(serializedPayload);
assert(result);
diff --git a/Swift/Controllers/Chat/ChatMessageParser.cpp b/Swift/Controllers/Chat/ChatMessageParser.cpp
index 1a822a1..31be451 100644
--- a/Swift/Controllers/Chat/ChatMessageParser.cpp
+++ b/Swift/Controllers/Chat/ChatMessageParser.cpp
@@ -132,7 +132,7 @@ namespace Swift {
}
}
- catch (std::runtime_error) {
+ catch (const std::runtime_error&) {
/* Basically too expensive to compute the regex results and it gave up, so pass through as text */
newMessage.append(part);
}
@@ -185,7 +185,7 @@ namespace Swift {
resultMessage.append(std::make_shared<ChatWindow::ChatTextMessagePart>(std::string(start, text.end())));
}
}
- catch (std::runtime_error) {
+ catch (const std::runtime_error&) {
/* Basically too expensive to compute the regex results and it gave up, so pass through as text */
resultMessage.append(part);
}
diff --git a/Swiften/Parser/BOSHBodyExtractor.cpp b/Swiften/Parser/BOSHBodyExtractor.cpp
index 803f16a..c45d338 100644
--- a/Swiften/Parser/BOSHBodyExtractor.cpp
+++ b/Swiften/Parser/BOSHBodyExtractor.cpp
@@ -126,7 +126,7 @@ BOSHBodyExtractor::BOSHBodyExtractor(XMLParserFactory* parserFactory, const Byte
// Parse the body element
BOSHBodyParserClient parserClient(this);
- std::shared_ptr<XMLParser> parser(std::move(parserFactory->createXMLParser(&parserClient)));
+ std::shared_ptr<XMLParser> parser(parserFactory->createXMLParser(&parserClient));
if (!parser->parse(std::string(
reinterpret_cast<const char*>(vecptr(data)),
boost::numeric_cast<size_t>(std::distance(data.begin(), i))))) {