Skip to content

Commit 4ad64c5

Browse files
committed
Use intx::as_bytes where possible
1 parent 766ebf5 commit 4ad64c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/evmone/analysis.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ code_analysis analyze(evmc_revision rev, const uint8_t* code, size_t code_size)
118118
const auto push_end = code_pos + push_size;
119119

120120
auto& push_value = analysis.push_values.emplace_back();
121-
// TODO: Add as_bytes() helper to intx.
122-
const auto push_value_bytes = reinterpret_cast<uint8_t*>(intx::as_words(push_value));
121+
const auto push_value_bytes = intx::as_bytes(push_value);
123122
auto insert_pos = &push_value_bytes[push_size - 1];
124123

125124
// Copy bytes to the deticated storage in the order to match native endianness.

0 commit comments

Comments
 (0)