Fix lambda capture expression for windows

Summary:
there was an error when accessing kItersPerThread in the lambda:
https://ci.appveyor.com/project/Facebook/rocksdb/build/1.0.1654

Test Plan: doitlive

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D62379
This commit is contained in:
Andrew Kryczka 2016-08-23 10:20:00 -07:00
parent 6584cec8f2
commit 5440675c3d

View File

@ -466,7 +466,7 @@ TEST_F(ThreadLocalTest, Fold) {
port::Mutex mu; port::Mutex mu;
port::CondVar cv(&mu); port::CondVar cv(&mu);
Params params(&mu, &cv, nullptr, kNumThreads, unref); Params params(&mu, &cv, nullptr, kNumThreads, unref);
auto func = [](void* ptr) { auto func = [&](void* ptr) {
auto& p = *static_cast<Params*>(ptr); auto& p = *static_cast<Params*>(ptr);
ASSERT_TRUE(p.tls1.Get() == nullptr); ASSERT_TRUE(p.tls1.Get() == nullptr);
p.tls1.Reset(new std::atomic<int64_t>(0)); p.tls1.Reset(new std::atomic<int64_t>(0));