summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse-api/domain/converters.impl.h2
-rw-r--r--gentoobrowse-api/service/xsltStreamSerializer.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/gentoobrowse-api/domain/converters.impl.h b/gentoobrowse-api/domain/converters.impl.h
index 38a674e..ebff336 100644
--- a/gentoobrowse-api/domain/converters.impl.h
+++ b/gentoobrowse-api/domain/converters.impl.h
@@ -68,6 +68,6 @@ namespace Slicer {
}
}
ss << "}";
- return ss.str();
+ return std::move(ss).str();
}
}
diff --git a/gentoobrowse-api/service/xsltStreamSerializer.cpp b/gentoobrowse-api/service/xsltStreamSerializer.cpp
index acb5750..9d453ac 100644
--- a/gentoobrowse-api/service/xsltStreamSerializer.cpp
+++ b/gentoobrowse-api/service/xsltStreamSerializer.cpp
@@ -62,7 +62,7 @@ namespace Gentoo {
xmlOutputBufferClose(buf);
return std::make_shared<MultiPart>(Headers {}, "related",
Parts {
- std::make_shared<TextPart>(Headers {}, "text/html", strm.str()),
+ std::make_shared<TextPart>(Headers {}, "text/html", std::move(strm).str()),
std::make_shared<TextPart>(
Headers {
{"Content-Id", "<style.css@gentoobrowse.randomdan.homeip.net>"},
@@ -74,7 +74,6 @@ namespace Gentoo {
IceTray::Mime::BasicPartPtr
XsltStreamSerializer::getText(xmlDoc * result)
{
- std::stringstream strm;
std::vector<std::string> callLynx {
"/usr/bin/lynx",
"-dump",
@@ -88,6 +87,7 @@ namespace Gentoo {
fclose(lynxIn);
std::array<char, BUFSIZ> buf {};
ssize_t r;
+ std::stringstream strm;
while ((r = read(fds.fdOut(), buf.data(), buf.size())) > 0) {
strm.write(buf.data(), r);
}
@@ -96,6 +96,6 @@ namespace Gentoo {
if (status != 0) {
throw std::runtime_error("Lynx failed");
}
- return std::make_shared<TextPart>(Headers {}, "text/plain", strm.str());
+ return std::make_shared<TextPart>(Headers {}, "text/plain", std::move(strm).str());
}
}