Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Chris Müller
crystal
Commits
b1340495
Commit
b1340495
authored
Oct 28, 2012
by
Chris Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: cry_ordering_funptr works with const_pointers.
Adjust cry_int_compare and cry_double_compare to this change.
parent
c474d02e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/structures/structures.c
src/structures/structures.c
+4
-4
No files found.
src/structures/structures.c
View file @
b1340495
...
...
@@ -21,9 +21,9 @@
int
cry_int_compare
(
const_pointer
a
,
const_pointer
b
)
{
if
(
*
cry_cast
(
int
*
,
a
)
<
*
cry_cast
(
int
*
,
b
))
if
(
*
cry_cast
(
const
int
*
,
a
)
<
*
cry_cast
(
const
int
*
,
b
))
return
-
1
;
else
if
(
*
cry_cast
(
int
*
,
a
)
>
*
cry_cast
(
int
*
,
b
))
else
if
(
*
cry_cast
(
const
int
*
,
a
)
>
*
cry_cast
(
const
int
*
,
b
))
return
1
;
return
0
;
...
...
@@ -33,9 +33,9 @@ cry_int_compare(const_pointer a, const_pointer b)
int
cry_double_compare
(
const_pointer
a
,
const_pointer
b
)
{
if
(
*
cry_cast
(
double
*
,
a
)
<
*
cry_cast
(
double
*
,
b
))
if
(
*
cry_cast
(
const
double
*
,
a
)
<
*
cry_cast
(
const
double
*
,
b
))
return
-
1
;
else
if
(
*
cry_cast
(
double
*
,
a
)
>
*
cry_cast
(
double
*
,
b
))
else
if
(
*
cry_cast
(
const
double
*
,
a
)
>
*
cry_cast
(
const
double
*
,
b
))
return
1
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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