Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
43fbf5d5
Commit
43fbf5d5
authored
Apr 17, 2014
by
Thomas Jahns
🤸
Browse files
Add const declaration to pointers to data only read.
parent
ca7df67d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/zaxis.c
View file @
43fbf5d5
...
...
@@ -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
]);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment