Skip to content

Commit

Permalink
Fix unused variables in IntVect (#4133)
Browse files Browse the repository at this point in the history
The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate
  • Loading branch information
atmyers authored Sep 5, 2024
1 parent 13d20a2 commit ad118de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Src/Base/AMReX_IntVect.H
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ public:
static constexpr unsigned shift1 = sizeof(size_t)>=8 ? 20 : 10;
static constexpr unsigned shift2 = sizeof(size_t)>=8 ? 40 : 20;
if constexpr (dim == 1) {
amrex::ignore_unused(shift1);
amrex::ignore_unused(shift2);
return static_cast<std::size_t>(vec[0]);
} else if constexpr (dim == 2) {
amrex::ignore_unused(shift2);
return static_cast<std::size_t>(vec[0]) ^
(static_cast<std::size_t>(vec[1]) << shift1);
} else if constexpr (dim == 3) {
Expand Down

0 comments on commit ad118de

Please sign in to comment.