Original warning:
src/timefunc.hxx:418:30: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
The function 'get_msec' was declared to return 'const long' but the const on
return by value is meaningless (the return value is a prvalue, not an lvalue).
Changed to 'long get_msec()' and also changed implementation to access
value.tv_nsec directly to avoid calling non-const get_nsec from const method.
inline CONSTEXPR const long &get_nsec (void) const NOEXCEPT
{ return this->value.tv_nsec; }
- inline CONSTEXPR const long get_msec (void) const NOEXCEPT
- { return this->get_nsec () / 1000000; }
+ inline CONSTEXPR long get_msec (void) const NOEXCEPT
+ { return this->value.tv_nsec / 1000000; }
int64_t as_nanosec (void) const NOEXCEPT;