Commit e5a6b518 authored by Nathan Bronson's avatar Nathan Bronson Committed by Facebook Github Bot

make F14 prehash token default constructible

Summary:
Using an array of prehash tokens is quite inconvenient without
the ability to default construct them.

Reviewed By: shixiao

Differential Revision: D7490113

fbshipit-source-id: f802a7dc6dc2c603c4682e5f384d9f135220cd54
parent 68cb50c5
...@@ -97,6 +97,9 @@ class F14Table; ...@@ -97,6 +97,9 @@ class F14Table;
} // namespace f14 } // namespace f14
class F14HashToken final { class F14HashToken final {
public:
F14HashToken() = default;
private: private:
using HashPair = std::pair<std::size_t, uint8_t>; using HashPair = std::pair<std::size_t, uint8_t>;
......
...@@ -387,7 +387,8 @@ void runPrehash() { ...@@ -387,7 +387,8 @@ void runPrehash() {
EXPECT_FALSE(h.find(s("abc")) == h.end()); EXPECT_FALSE(h.find(s("abc")) == h.end());
auto t1 = h.prehash(s("def")); auto t1 = h.prehash(s("def"));
auto t2 = h.prehash(s("abc")); F14HashToken t2;
t2 = h.prehash(s("abc"));
EXPECT_TRUE(h.find(t1, s("def")) == h.end()); EXPECT_TRUE(h.find(t1, s("def")) == h.end());
EXPECT_FALSE(h.find(t2, s("abc")) == h.end()); EXPECT_FALSE(h.find(t2, s("abc")) == h.end());
} }
......
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