Skip to content

Commit

Permalink
Derivs: Add const declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Jul 26, 2023
1 parent 90a7b32 commit ab91223
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Derivs/src/derivs.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ deriv2_2d(const TS var, const T dx, const T dy) {
std::array<R, ndyvars> dyvar;

for (std::ptrdiff_t n = 0; n < ndyvars; ++n) {
std::ptrdiff_t di = n - deriv_order;
const std::ptrdiff_t di = n - deriv_order;
// Skip the unused central point, but only if there is no vectorization
if (vsize == 1 && di == 0)
continue;
Expand Down Expand Up @@ -305,7 +305,7 @@ deriv2_2d(const TS var, const T dx, const T dy) {
#endif

for (std::ptrdiff_t n = 0; n < ndyvars; ++n) {
std::ptrdiff_t di = n - deriv_order;
const std::ptrdiff_t di = n - deriv_order;
// Skip the unused central point
if (di == 0)
continue;
Expand Down

0 comments on commit ab91223

Please sign in to comment.