summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-07-04 13:01:02 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-07-05 02:56:25 -0400
commitf6d2536e4f2633757cce75f45a1ee9f6003be90a (patch)
treef950a6c5955775dc98b9c598187ff32801aad90c
parent6cf176900f0c89e20557742dbcd1174799440f8f (diff)
Make LLDate a trivial copyable/movable type
-rw-r--r--indra/llcommon/lldate.cpp9
-rw-r--r--indra/llcommon/lldate.h9
2 files changed, 3 insertions, 15 deletions
diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp
index c63c7012d1..b38864688d 100644
--- a/indra/llcommon/lldate.cpp
+++ b/indra/llcommon/lldate.cpp
@@ -41,20 +41,11 @@
#include "llstring.h"
#include "llfasttimer.h"
-static const F64 DATE_EPOCH = 0.0;
-
static const F64 LL_APR_USEC_PER_SEC = 1000000.0;
// should be APR_USEC_PER_SEC, but that relies on INT64_C which
// isn't defined in glib under our build set up for some reason
-LLDate::LLDate() : mSecondsSinceEpoch(DATE_EPOCH)
-{}
-
-LLDate::LLDate(const LLDate& date) :
- mSecondsSinceEpoch(date.mSecondsSinceEpoch)
-{}
-
LLDate::LLDate(F64SecondsImplicit seconds_since_epoch) :
mSecondsSinceEpoch(seconds_since_epoch.value())
{}
diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h
index 81f2dd0d1c..1a69a04232 100644
--- a/indra/llcommon/lldate.h
+++ b/indra/llcommon/lldate.h
@@ -43,16 +43,13 @@
*/
class LL_COMMON_API LLDate
{
+ static constexpr F64 DATE_EPOCH = 0.0;
public:
/**
* @brief Construct a date equal to epoch.
*/
- LLDate();
-
- /**
- * @brief Construct a date equal to the source date.
- */
- LLDate(const LLDate& date);
+ constexpr LLDate() : mSecondsSinceEpoch(DATE_EPOCH)
+ {}
/**
* @brief Construct a date from a seconds since epoch value.