Skip to content

Commit 7f8a3ce

Browse files
committed
Drive by clang-tidy
1 parent f958194 commit 7f8a3ce

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

category/execution/ethereum/core/contract/abi_encode.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ constexpr bytes32_t abi_encode_uint(I const &i)
5858

5959
constexpr bytes32_t abi_encode_bool(bool const b)
6060
{
61-
u64_be as_int = b ? 1 : 0;
61+
u64_be const as_int = b ? 1 : 0;
6262
return abi_encode_uint(as_int);
6363
}
6464

@@ -159,7 +159,8 @@ class AbiEncoder
159159
byte_string encode_final()
160160
{
161161
for (auto const [unresolved, tail_cumsum] : unresolved_offsets_) {
162-
u256_be offset = static_cast<uint256_t>(head_.size()) + tail_cumsum;
162+
u256_be const offset =
163+
static_cast<uint256_t>(head_.size()) + tail_cumsum;
163164
uint8_t *const p = &head_[unresolved];
164165
bytes32_t encoded = abi_encode_uint(offset);
165166
std::memcpy(p, encoded.bytes, sizeof(bytes32_t));

category/execution/ethereum/core/contract/big_endian.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct BigEndian
3737

3838
BigEndian() = default;
3939

40-
constexpr BigEndian(T const &x) noexcept
40+
constexpr explicit(false) BigEndian(T const &x) noexcept
4141
{
4242
auto const be = intx::bswap(x);
4343
unaligned_store(bytes, be);

0 commit comments

Comments
 (0)