mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
another cast bites the dust
Original commit message from CVS: another cast bites the dust
This commit is contained in:
parent
8808565b44
commit
78c180ea28
1 changed files with 12 additions and 1 deletions
|
@ -310,8 +310,19 @@ guint64_to_gdouble (guint64 value)
|
|||
else
|
||||
return (gdouble) ((gint64) value);
|
||||
}
|
||||
|
||||
static gdouble
|
||||
gdouble_to_guint64 (gdouble value)
|
||||
{
|
||||
if (value < (gdouble) 9223372036854775808.) /* 1 << 63 */
|
||||
return ((guint64) ((gint64) value));
|
||||
|
||||
value -= 9223372036854775808.;
|
||||
return ((guint64) ((gint64) value)) + 1LL << 63;
|
||||
}
|
||||
#else
|
||||
#define guint64_to_gdouble(value) ((gdouble) value)
|
||||
#define gdouble_to_guint64(value) ((guint64) (value))
|
||||
#define guint64_to_gdouble(value) ((gdouble) (value))
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue