From d935edeea5d02b63daf566f749a5f289dee7a91f Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sun, 8 Sep 2024 21:10:49 +0800 Subject: [PATCH] [gnc-date.cpp] deprecate gnc_difftime because it casts time64 to doubles --- libgnucash/engine/gnc-date.cpp | 1 + libgnucash/engine/gnc-date.h | 1 + 2 files changed, 2 insertions(+) diff --git a/libgnucash/engine/gnc-date.cpp b/libgnucash/engine/gnc-date.cpp index 8c8cf49baa4..f64863888d2 100644 --- a/libgnucash/engine/gnc-date.cpp +++ b/libgnucash/engine/gnc-date.cpp @@ -270,6 +270,7 @@ gnc_time (time64 *tbuf) gdouble gnc_difftime (const time64 secs1, const time64 secs2) { + PWARN ("gnc_difftime is deprecated"); return (double)secs1 - (double)secs2; } diff --git a/libgnucash/engine/gnc-date.h b/libgnucash/engine/gnc-date.h index 2b0c2518625..d44bc2b2895 100644 --- a/libgnucash/engine/gnc-date.h +++ b/libgnucash/engine/gnc-date.h @@ -224,6 +224,7 @@ gchar* gnc_ctime (const time64 *secs); time64 gnc_time (time64 *tbuf); /** \brief Find the difference in seconds between two time values + * (deprecated) * \param secs1: The first time value, in Seconds since * 00:00:00 UTC 01 January 1970 (negative values are seconds before that moment) * \param secs2: The second time value, in Seconds since