[mutter] clutter/private: Make all time unit conversions int64_t
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/private: Make all time unit conversions int64_t
- Date: Mon, 12 Oct 2020 15:03:33 +0000 (UTC)
commit 53c4ebee828d883370779df07ac08be0602c9647
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Mon Oct 12 15:05:37 2020 +0200
clutter/private: Make all time unit conversions int64_t
This way there is less risk of ending up with would-be negative unsigned
values.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1494
clutter/clutter/clutter-private.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/clutter/clutter/clutter-private.h b/clutter/clutter/clutter-private.h
index b6a8e10409..7e3b63cfa7 100644
--- a/clutter/clutter/clutter-private.h
+++ b/clutter/clutter/clutter-private.h
@@ -268,32 +268,32 @@ gboolean _clutter_run_progress_function (GType gtype,
void clutter_timeline_cancel_delay (ClutterTimeline *timeline);
-static inline uint64_t
-us (uint64_t us)
+static inline int64_t
+us (int64_t us)
{
return us;
}
-static inline uint32_t
-ms (uint32_t ms)
+static inline int64_t
+ms (int64_t ms)
{
return ms;
}
-static inline uint64_t
-ms2us (uint64_t ms)
+static inline int64_t
+ms2us (int64_t ms)
{
return us (ms * 1000);
}
-static inline uint32_t
-us2ms (uint64_t us)
+static inline int64_t
+us2ms (int64_t us)
{
- return (uint32_t) (us / 1000);
+ return (int64_t) (us / 1000);
}
-static inline uint64_t
-ns2us (uint64_t ns)
+static inline int64_t
+ns2us (int64_t ns)
{
return us (ns / 1000);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]