Skip to content

Commit 951787c

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Fix redundant-constexpr-static-def in mcrouter/lib/MessageQueue.h +4
Summary: LLVM has a warning `-Wdeprecated-redundant-constexpr-static-def` which we are enabling to reduce unnecessary code. For questions/comments, contact r-barnes. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: meyering Differential Revision: D77194591 fbshipit-source-id: d3f817fa69182cdafb9ebffae6c1580b152650fd
1 parent 2727a3f commit 951787c

File tree

4 files changed

+0
-23
lines changed

4 files changed

+0
-23
lines changed

third-party/mcrouter/src/mcrouter/lib/MessageQueue.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,5 @@ class MessageQueue {
353353
std::shared_ptr<folly::EventBase::LoopCallback> queueDrainCallback_;
354354
};
355355

356-
// Static member definition
357-
template <class T>
358-
constexpr int64_t MessageQueue<T>::kWakeupEveryMs;
359-
360356
} // namespace memcache
361357
} // namespace facebook

third-party/mcrouter/src/mcrouter/lib/carbon/Stats.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,4 @@ class Stats {
178178
RateStats rateStats_;
179179
};
180180

181-
template <class RouterInfo>
182-
constexpr std::array<folly::StringPiece, Stats<RouterInfo>::SumStats::kNumStats>
183-
Stats<RouterInfo>::SumStats::kStatNames;
184-
185-
template <class RouterInfo>
186-
constexpr std::
187-
array<folly::StringPiece, Stats<RouterInfo>::RateStats::kNumStats>
188-
Stats<RouterInfo>::RateStats::kStatNames;
189-
190181
} // namespace carbon

third-party/mcrouter/src/mcrouter/lib/network/TypedMsg-inl.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ struct CallDispatcherImplExpanded<List<Ms...>, MaxId, Proc, Args...> {
3939
{DispatchImpl<Ms, Proc, Args...>::func...}};
4040
};
4141

42-
/* Array needs definition outside of the class */
43-
template <class... Ms, size_t MaxId, class Proc, class... Args>
44-
constexpr std::array<DispatchFunc<Proc, Args...>, MaxId + 1>
45-
CallDispatcherImplExpanded<List<Ms...>, MaxId, Proc, Args...>::array_;
46-
4742
// Sort List<Ms...> by M::typeId, expand to fill 0s, call ImplExpanded
4843
template <class... Ms, class Proc, class... Args>
4944
struct CallDispatcherImpl<List<Ms...>, Proc, Args...>

third-party/mcrouter/src/mcrouter/routes/LoadBalancerRoute.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,6 @@ class LoadBalancerRoute {
328328
}
329329
};
330330

331-
template <class RouterInfo>
332-
constexpr folly::StringPiece LoadBalancerRoute<RouterInfo>::kWeightedHashing;
333-
template <class RouterInfo>
334-
constexpr folly::StringPiece LoadBalancerRoute<RouterInfo>::kTwoRandomChoices;
335-
336331
template <class RouterInfo>
337332
struct LoadBalancerRouteOptions {
338333
folly::StringPiece salt;

0 commit comments

Comments
 (0)