Skip to content

Commit c051c84

Browse files
committed
++ cache row span
1 parent 774fc94 commit c051c84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storage/cacheRowSpan.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ std::optional<size_t> CacheRowSpan::find_empty() const noexcept
7474
#ifdef WITH_CTT
7575
size_t CacheRowSpan::find_victim(const timeval& now) const noexcept
7676
{
77-
const FlowRecord** victim = const_cast<const FlowRecord**>(m_begin) + m_count - 1;
78-
auto it = std::find_if(m_begin, m_begin + m_count, [&](const FlowRecord*& flow) {
77+
FlowRecord* const* victim = m_begin + m_count - 1;
78+
auto it = std::find_if(m_begin, m_begin + m_count, [&](FlowRecord* const& flow) {
7979
if (!flow->is_in_ctt) {
8080
victim = &flow;
8181
}
8282
return flow->is_waiting_for_export && now > flow->export_time;
8383
});
8484
if (it == m_begin + m_count) {
85-
return victim - const_cast<const FlowRecord**>(m_begin);
85+
return victim - m_begin;
8686
}
8787
return it - m_begin;
8888
}

0 commit comments

Comments
 (0)