Commit b1340495 authored by Chris Müller's avatar Chris Müller

lib: cry_ordering_funptr works with const_pointers.

Adjust cry_int_compare and cry_double_compare to this change.
parent c474d02e
......@@ -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;
......
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