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

Unified Diff: test/DefaultFileSystem.cpp

Issue 29409580: Issue 5013 - Make parameter const ref when applicable. (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Pass ref or const ref instead of shared_ptr<> Created April 11, 2017, 3:37 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/BaseJsTest.h ('k') | test/FileSystemJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/DefaultFileSystem.cpp
===================================================================
--- a/test/DefaultFileSystem.cpp
+++ b/test/DefaultFileSystem.cpp
@@ -21,18 +21,18 @@
namespace
{
const std::string testPath = "libadblockplus-t\xc3\xa4st-file";
void WriteString(AdblockPlus::FileSystem& fileSystem,
const std::string& content)
{
- std::shared_ptr<std::stringstream> input(new std::stringstream);
- *input << content;
+ std::stringstream input;
+ input << content;
fileSystem.Write(testPath, input);
}
}
TEST(DefaultFileSystemTest, WriteReadRemove)
{
AdblockPlus::DefaultFileSystem fileSystem;
WriteString(fileSystem, "foo");
« no previous file with comments | « test/BaseJsTest.h ('k') | test/FileSystemJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld