Commit 540c120e authored by Dominik Charousset's avatar Dominik Charousset

Remove dead code

parent d162ba49
...@@ -350,16 +350,12 @@ class match_expr { ...@@ -350,16 +350,12 @@ class match_expr {
template <class T, class... Ts> template <class T, class... Ts>
match_expr(T v, Ts&&... vs) : m_cases(std::move(v), std::forward<Ts>(vs)...) { match_expr(T v, Ts&&... vs) : m_cases(std::move(v), std::forward<Ts>(vs)...) {
init(); // nop
} }
match_expr(match_expr&& other) : m_cases(std::move(other.m_cases)) { match_expr(match_expr&& other) = default;
init();
}
match_expr(const match_expr& other) : m_cases(other.m_cases) { match_expr(const match_expr& other) = default;
init();
}
result_type operator()(const message& tup) { result_type operator()(const message& tup) {
return apply(tup); return apply(tup);
...@@ -404,27 +400,6 @@ class match_expr { ...@@ -404,27 +400,6 @@ class match_expr {
using cache_element = std::pair<const std::type_info*, uint64_t>; using cache_element = std::pair<const std::type_info*, uint64_t>;
std::vector<cache_element> m_cache;
// ring buffer like access to m_cache
size_t m_cache_begin;
size_t m_cache_end;
cache_element m_dummy;
static void advance_(size_t& i) {
i = (i + 1) % cache_size;
}
void init() {
m_dummy.second = std::numeric_limits<uint64_t>::max();
m_cache.resize(cache_size);
for (auto& entry : m_cache) {
entry.first = nullptr;
}
m_cache_begin = m_cache_end = 0;
}
template <class Msg> template <class Msg>
result_type apply(Msg& msg) { result_type apply(Msg& msg) {
idx_token_type idx_token; idx_token_type idx_token;
......
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