Skip to content

Commit

Permalink
Fix clang-tidy findings
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Oct 24, 2024
1 parent 3360d15 commit 52d8476
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/tao/pq/binary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace tao::pq
[[nodiscard]] auto to_binary_view( const T* data, const std::size_t size ) noexcept -> binary_view
{
static_assert( sizeof( T ) == 1 );
return binary_view( reinterpret_cast< const std::byte* >( data ), size );
return { reinterpret_cast< const std::byte* >( data ), size };
}

template< typename T >
Expand All @@ -32,7 +32,7 @@ namespace tao::pq
{
static_assert( sizeof( T ) == 1 );
auto* ptr = reinterpret_cast< const std::byte* >( data );
return binary( ptr, ptr + size );
return { ptr, ptr + size };
}

template< typename T >
Expand Down
2 changes: 1 addition & 1 deletion include/tao/pq/internal/resize_uninitialized.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace tao::pq::internal
struct no_init_byte
{
std::byte b;
no_init_byte() noexcept {}
no_init_byte() noexcept {} // NOLINT(modernize-use-equals-default)
};
static_assert( sizeof( std::vector< std::byte > ) == sizeof( std::vector< no_init_byte > ) );
static_assert( alignof( std::vector< std::byte > ) == alignof( std::vector< no_init_byte > ) );
Expand Down

0 comments on commit 52d8476

Please sign in to comment.