Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/FileSystemJsObject.cpp

Issue 29409580: Issue 5013 - Make parameter const ref when applicable. (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created April 11, 2017, 1:58 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/Utils.cpp ('K') | « test/BaseJsTest.h ('k') | test/Prefs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/FileSystemJsObject.cpp
===================================================================
--- a/test/FileSystemJsObject.cpp
+++ b/test/FileSystemJsObject.cpp
@@ -45,17 +45,17 @@
{
if (!success)
throw std::runtime_error("Unable to read " + path);
std::stringstream* const stream = new std::stringstream;
*stream << contentToRead;
return std::shared_ptr<std::istream>(stream);
}
- void Write(const std::string& path, std::shared_ptr<std::istream> data)
+ void Write(const std::string& path, const std::shared_ptr<std::istream>& data)
{
if (!success)
throw std::runtime_error("Unable to write to " + path);
lastWrittenPath = path;
std::stringstream content;
content << data->rdbuf();
lastWrittenContent = content.str();
« src/Utils.cpp ('K') | « test/BaseJsTest.h ('k') | test/Prefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld