[core] Pass a value to response callback, not a reference

This commit is contained in:
John Firebaugh
2015-11-12 17:12:19 -08:00
parent 36581f3d30
commit 1caf89c32b
22 changed files with 45 additions and 56 deletions

View File

@@ -23,7 +23,7 @@ TEST_F(Storage, HTTPLoad) {
const auto current = number++;
reqs[i] = fs.request({ Resource::Unknown,
std::string("http://127.0.0.1:3000/load/") + std::to_string(current) },
[&, i, current](const Response &res) {
[&, i, current](Response res) {
fs.cancel(reqs[i]);
reqs[i] = nullptr;
EXPECT_EQ(nullptr, res.error);