/* static */ if (forwardQuantum != 0) {
if ((size_ + 1) % forwardQuantum == 0) {
- const auto pos = size_ / forwardQuantum;
+ const auto k = size_ / forwardQuantum;
// Store the number of preceding 0-bits.
- forwardPointers_[pos] = upperBits;
+ forwardPointers_[k] = upperBits;
}
}
// Interpose our completion callback
auto& nextCb = op->notificationCallback();
- op->setNotificationCallback([this, nextCb](AsyncIOOp* op) {
- this->onCompleted(op);
- if (nextCb) nextCb(op);
+ op->setNotificationCallback([this, nextCb](AsyncIOOp* op2) {
+ this->onCompleted(op2);
+ if (nextCb) nextCb(op2);
});
asyncIO_->submit(op);
int StubClock::t = 0;
TEST(TestAutoTimer, HandleBasicClosure) {
- auto logger = [](StringPiece msg, auto sec) {
- return StubLogger()(msg, sec);
+ auto logger = [](StringPiece mesg, auto sec) {
+ return StubLogger()(mesg, sec);
};
StubClock::t = 1;
// Here decltype is needed. But since most users are expected to use this
auto t = makeAutoTimer(
"Third message on destruction",
std::chrono::duration<double>::zero(),
- [](StringPiece msg, auto sec) {
- GoogleLogger<GoogleLoggerStyle::PRETTY>()(msg, sec);
+ [](StringPiece mesg, auto sec) {
+ GoogleLogger<GoogleLoggerStyle::PRETTY>()(mesg, sec);
});
t.log("First message");
t.log("Second message");
p.required(4, [&](const dynamic& v) {
EXPECT_EQ(4, p.key().getInt());
EXPECT_EQ(v, p.value());
- p.optional("bools", [&](const std::string& k, const dynamic& v) {
+ p.optional("bools", [&](const std::string& k, const dynamic& v2) {
EXPECT_EQ(std::string("bools"), k);
EXPECT_EQ(k, p.key().getString());
- EXPECT_EQ(v, p.value());
- p.arrayItems([&](int64_t k, bool v) {
+ EXPECT_EQ(v2, p.value());
+ p.arrayItems([&](int64_t k, bool v3) {
EXPECT_EQ(bools.size(), k);
EXPECT_EQ(k, p.key().getInt());
- EXPECT_EQ(v, p.value().asBool());
- bools.push_back(v);
+ EXPECT_EQ(v3, p.value().asBool());
+ bools.push_back(v3);
});
});
});