Skip to content

Commit

Permalink
fix shadow warning
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraPerego committed Jan 24, 2025
1 parent 3ed77f2 commit 4b4e84f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/CLUEstering/AlpakaCore/getDeviceCachingAllocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ namespace clue {
}

// use a custom deleter to destroy all objects and deallocate the memory
auto deleter = [size](Allocator* ptr) {
auto deleter = [size](Allocator* pointer) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 13.1 rule Note

MISRA 13.1 rule
for (size_t i = size; i > 0; --i) {
(ptr + i - 1)->~Allocator();
(pointer + i - 1)->~Allocator();

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 18.4 rule Note

MISRA 18.4 rule

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 10.4 rule Note

MISRA 10.4 rule
}
std::allocator<Allocator>().deallocate(ptr, size);
std::allocator<Allocator>().deallocate(pointer, size);
};

return std::unique_ptr<Allocator[], decltype(deleter)>(ptr, deleter);
Expand Down

0 comments on commit 4b4e84f

Please sign in to comment.