Commit 43fbf5d5 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Add const declaration to pointers to data only read.

parent ca7df67d
......@@ -1553,7 +1553,7 @@ zaxisCompareP(zaxis_t *z1, zaxis_t *z2)
anyPresent |= present;
if (!diff && present)
{
double *p = z1->vals, *q = z2->vals;
const double *p = z1->vals, *q = z2->vals;
for (int i = 0; i < size; i++)
diff |= IS_NOT_EQUAL(p[i], q[i]);
}
......@@ -1563,7 +1563,7 @@ zaxisCompareP(zaxis_t *z1, zaxis_t *z2)
anyPresent |= present;
if (!diff && present)
{
double *p = z1->lbounds, *q = z2->lbounds;
const double *p = z1->lbounds, *q = z2->lbounds;
for (int i = 0; i < size; i++)
diff |= IS_NOT_EQUAL(p[i], q[i]);
}
......@@ -1573,7 +1573,7 @@ zaxisCompareP(zaxis_t *z1, zaxis_t *z2)
anyPresent |= present;
if (!diff && present)
{
double *p = z1->ubounds, *q = z2->ubounds;
const double *p = z1->ubounds, *q = z2->ubounds;
for (int i = 0; i < size; ++i)
diff |= IS_NOT_EQUAL(p[i], q[i]);
}
......@@ -1583,7 +1583,7 @@ zaxisCompareP(zaxis_t *z1, zaxis_t *z2)
anyPresent |= present;
if (!diff && present)
{
double *p = z1->weights, *q = z2->weights;
const double *p = z1->weights, *q = z2->weights;
for (int i = 0; i < size; ++i)
diff |= IS_NOT_EQUAL(p[i], q[i]);
}
......@@ -1594,7 +1594,7 @@ zaxisCompareP(zaxis_t *z1, zaxis_t *z2)
{
int vctsize = z1->vctsize;
xassert(vctsize);
double *p = z1->vct, *q = z2->vct;
const double *p = z1->vct, *q = z2->vct;
for (int i = 0; i < vctsize; ++i)
diff |= IS_NOT_EQUAL(p[i], q[i]);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment