diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-12 15:51:45 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-16 12:25:47 -0800 |
commit | 7137239cbddb13e1c33240d13002973b5a222775 (patch) | |
tree | 99ad3ca2d8b5230eba3f5bacefe63098568dbdd4 /test/storage/http_load.cpp | |
parent | 1caf89c32b80dc300b1fd349a2ece4557890c727 (diff) | |
download | qtlocation-mapboxgl-7137239cbddb13e1c33240d13002973b5a222775.tar.gz |
[core] Use std::unique_ptr for FileSource request
Diffstat (limited to 'test/storage/http_load.cpp')
-rw-r--r-- | test/storage/http_load.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/storage/http_load.cpp b/test/storage/http_load.cpp index fef1f06e7b..0a6b0ef653 100644 --- a/test/storage/http_load.cpp +++ b/test/storage/http_load.cpp @@ -17,15 +17,14 @@ TEST_F(Storage, HTTPLoad) { const int max = 10000; int number = 1; - Request* reqs[concurrency]; + std::unique_ptr<FileRequest> reqs[concurrency]; std::function<void(int)> req = [&](int i) { 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](Response res) { - fs.cancel(reqs[i]); - reqs[i] = nullptr; + reqs[i].reset(); EXPECT_EQ(nullptr, res.error); EXPECT_EQ(false, res.stale); ASSERT_TRUE(res.data.get()); |