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: the input stream is no longer const. Created April 12, 2017, 3:08 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
« no previous file with comments | « test/DefaultFileSystem.cpp ('k') | test/FilterEngine.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,24 +45,24 @@
{
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, std::istream& data)
{
if (!success)
throw std::runtime_error("Unable to write to " + path);
lastWrittenPath = path;
std::stringstream content;
- content << data->rdbuf();
+ content << data.rdbuf();
lastWrittenContent = content.str();
}
void Move(const std::string& fromPath, const std::string& toPath)
{
if (!success)
throw std::runtime_error("Unable to move " + fromPath + " to "
+ toPath);
« no previous file with comments | « test/DefaultFileSystem.cpp ('k') | test/FilterEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld