Skip to content

Commit

Permalink
Workaround for annoying compilers that dont move
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Jun 26, 2024
1 parent 3572fe3 commit 39e3d71
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/LoadStoreChunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ namespace
auto
asWriteBuffer(UniquePtrWithLambda<T const> &&ptr) -> auxiliary::WriteBuffer

Check notice

Code scanning / CodeQL

Unused static function Note

Static function asWriteBuffer is unreachable
{
auto raw_ptr = ptr.get();
auto raw_ptr = ptr.release();
return asWriteBuffer(std::shared_ptr<T const>{
raw_ptr, [ptr_lambda = std::move(ptr)](auto const *) {}});
raw_ptr,
[deleter = std::move(ptr.get_deleter())](auto const *delete_me) {
deleter(delete_me);
}});
}
} // namespace

Expand Down

0 comments on commit 39e3d71

Please sign in to comment.