Skip to content

Commit 83ed1c6

Browse files
yfeldblumfacebook-github-bot
authored andcommitted
cut unnecessary ctor args to folly::ThreadLocal
Summary: `folly::ThreadLocal` accepts a constructor function to construct instances, but it is not necessary when it does the same thing as the default constructor function: make and return a new instance of the type as `[] { return new T(); }`. Reviewed By: Gownta Differential Revision: D55784505 fbshipit-source-id: 5239cf12a73894e323f084f9848ca541d7bba6a6
1 parent cf311dd commit 83ed1c6

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

cachelib/cachebench/workload/OnlineGenerator.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ namespace cachebench {
2828

2929
OnlineGenerator::OnlineGenerator(const StressorConfig& config)
3030
: config_{config},
31-
key_([]() { return new std::string(); }),
3231
req_([&]() { return new Request(*key_, dummy_.begin(), dummy_.end()); }) {
3332
for (const auto& c : config_.poolDistributions) {
3433
if (c.keySizeRange.size() != c.keySizeRangeProbability.size() + 1) {

0 commit comments

Comments
 (0)