Commit 764cdc0d authored by Lilit Yenokyan's avatar Lilit Yenokyan Committed by Facebook Github Bot

Fix -Wpointer-bool-conversion violation

Summary:
Fixing warning exposed by -Wpointer-bool-conversion

```
 folly/container/test/F14MapTest.cpp:1370:35: error: address of function 'Tracked<0>::counts' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
            << "key_type ops " << Tracked<0>::counts << ", mapped_type ops "
                               ~~ ^~~~~~~~~~~~~~~~~~
folly/container/test/F14MapTest.cpp:1370:35: note: prefix with the address-of operator to silence this warning
            << "key_type ops " << Tracked<0>::counts << ", mapped_type ops "
                                  ^
                                  &
folly/container/test/F14MapTest.cpp:1371:16: error: address of function 'Tracked<1>::counts' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
            << Tracked<1>::counts;
            ~~ ^~~~~~~~~~~~~~~~~~
folly/container/test/F14MapTest.cpp:1371:16: note: prefix with the address-of operator to silence this warning
            << Tracked<1>::counts;
               ^
               &
2 errors generated.

Reviewed By: yfeldblum

Differential Revision: D19131722

fbshipit-source-id: 9db48848ab5d68bc73ab0d6a4ef557d0db05414e
parent 80fc6c6c
......@@ -1367,8 +1367,8 @@ TEST(F14VectorMap, destructuringErase) {
resetTracking();
m.erase(p1.first);
LOG(INFO) << "erase -> "
<< "key_type ops " << Tracked<0>::counts << ", mapped_type ops "
<< Tracked<1>::counts;
<< "key_type ops " << Tracked<0>::counts() << ", mapped_type ops "
<< Tracked<1>::counts();
// deleting p1 will cause p2 to be moved to the front of the values array
EXPECT_EQ(
Tracked<0>::counts().dist(Counts{0, 1, 0, 0}) +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment