Skip to content

Commit

Permalink
#2063: Remove unnecessary casts
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable authored and cwschilly committed Sep 20, 2024
1 parent f36c4f5 commit ecb566b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/vt/messaging/active.cc
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ void ActiveMessenger::finishPendingDataMsgAsyncRecv(InProgressDataIRecv* irecv)
vt_debug_print(
normal, active,
"finishPendingDataMsgAsyncRecv: continuation user_buf={}, buf={}\n",
reinterpret_cast<void*>(user_buf), reinterpret_cast<void*>(buf)
print_ptr(user_buf), print_ptr(buf)
);

if (user_buf == nullptr) {
Expand Down
5 changes: 2 additions & 3 deletions src/vt/pool/static_sized/memory_pool_equal.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ std::byte* MemoryPoolEqual<num_bytes_t, use_header>::alloc(
std::byte* ptr_ret = ptr;
if (use_header) {
ptr_ret = HeaderManagerType::setHeader(
sz, oversize, reinterpret_cast<std::byte*>(ptr)
sz, oversize, ptr
);
}

Expand All @@ -124,10 +124,9 @@ void MemoryPoolEqual<num_bytes_t, use_header>::dealloc(std::byte* const t) {
cur_slot_ - 1 >= 0, "Must be greater than zero"
);

auto t_char = reinterpret_cast<std::byte*>(t);
std::byte* ptr_actual = t;
if (use_header) {
ptr_actual = HeaderManagerType::getHeaderPtr(t_char);
ptr_actual = HeaderManagerType::getHeaderPtr(t);
}

holder_[--cur_slot_] = ptr_actual;
Expand Down

0 comments on commit ecb566b

Please sign in to comment.