Make LLDate a trivial copyable/movable type
parent
6cf176900f
commit
f6d2536e4f
|
|
@ -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())
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue