Skip to content

Commit 54c4760

Browse files
committed
++ controller
1 parent 9177cc1 commit 54c4760

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

storage/cttController.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ CttController::get_key_and_state(uint64_t flow_hash_ctt, const Flow& flow, uint8
109109

110110
std::vector<std::byte> CttController::assemble_key(uint64_t flow_hash_ctt)
111111
{
112-
return std::vector<std::byte>(&flow_hash_ctt, &flow_hash_ctt + m_key_size_bytes);
112+
return std::vector<std::byte>(reinterpret_cast<const std::byte*>(&flow_hash_ctt),
113+
reinterpret_cast<const std::byte*>(&flow_hash_ctt) + m_key_size_bytes);
113114
std::vector<std::byte> key(m_key_size_bytes, std::byte(0));
114115
for (size_t i = 0; i < sizeof(flow_hash_ctt) && i < m_key_size_bytes; ++i) {
115116
key[i] = static_cast<std::byte>((flow_hash_ctt >> (8 * i)) & 0xFF);

0 commit comments

Comments
 (0)