mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
Fix clang build. (nw)
This commit is contained in:
parent
9d7cbcaa40
commit
08d576e181
1 changed files with 6 additions and 6 deletions
|
@ -42,8 +42,8 @@ namespace plib
|
||||||
using internal_type = TYPE;
|
using internal_type = TYPE;
|
||||||
using mult_type = TYPE;
|
using mult_type = TYPE;
|
||||||
|
|
||||||
template <typename altTYPE, altTYPE>
|
template <typename altTYPE, altTYPE altRES>
|
||||||
friend class ptime;
|
friend struct ptime;
|
||||||
|
|
||||||
constexpr ptime() noexcept : m_time(0) {}
|
constexpr ptime() noexcept : m_time(0) {}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ namespace plib
|
||||||
// FIXME: check for overflow
|
// FIXME: check for overflow
|
||||||
template <typename O>
|
template <typename O>
|
||||||
constexpr explicit ptime(const ptime<O, RES> &rhs) noexcept
|
constexpr explicit ptime(const ptime<O, RES> &rhs) noexcept
|
||||||
: m_time(rhs.as_raw()) { }
|
: m_time(rhs.m_time) { }
|
||||||
|
|
||||||
template <typename O>
|
template <typename O>
|
||||||
C14CONSTEXPR ptime &operator+=(const ptime<O, RES> &rhs) noexcept
|
C14CONSTEXPR ptime &operator+=(const ptime<O, RES> &rhs) noexcept
|
||||||
|
@ -86,14 +86,14 @@ namespace plib
|
||||||
friend constexpr const ptime operator-(const ptime &lhs, const ptime<O, RES> &rhs) noexcept
|
friend constexpr const ptime operator-(const ptime &lhs, const ptime<O, RES> &rhs) noexcept
|
||||||
{
|
{
|
||||||
static_assert(ptime_le<ptime<O, RES>, ptime>::value, "Invalid ptime type");
|
static_assert(ptime_le<ptime<O, RES>, ptime>::value, "Invalid ptime type");
|
||||||
return ptime(lhs.m_time - rhs.as_raw());
|
return ptime(lhs.m_time - rhs.m_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename O>
|
template <typename O>
|
||||||
friend constexpr const ptime operator+(const ptime &lhs, const ptime<O, RES> &rhs) noexcept
|
friend constexpr const ptime operator+(const ptime &lhs, const ptime<O, RES> &rhs) noexcept
|
||||||
{
|
{
|
||||||
static_assert(ptime_le<ptime<O, RES>, ptime>::value, "Invalid ptime type");
|
static_assert(ptime_le<ptime<O, RES>, ptime>::value, "Invalid ptime type");
|
||||||
return ptime(lhs.m_time + rhs.as_raw());
|
return ptime(lhs.m_time + rhs.m_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
friend constexpr const ptime operator*(ptime lhs, const mult_type factor) noexcept
|
friend constexpr const ptime operator*(ptime lhs, const mult_type factor) noexcept
|
||||||
|
@ -105,7 +105,7 @@ namespace plib
|
||||||
friend constexpr mult_type operator/(const ptime lhs, const ptime<O, RES> rhs) noexcept
|
friend constexpr mult_type operator/(const ptime lhs, const ptime<O, RES> rhs) noexcept
|
||||||
{
|
{
|
||||||
static_assert(ptime_le<ptime<O, RES>, ptime>::value, "Invalid ptime type");
|
static_assert(ptime_le<ptime<O, RES>, ptime>::value, "Invalid ptime type");
|
||||||
return static_cast<mult_type>(lhs.m_time / rhs.as_raw());
|
return static_cast<mult_type>(lhs.m_time / rhs.m_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
friend constexpr bool operator<(const ptime lhs, const ptime rhs) noexcept
|
friend constexpr bool operator<(const ptime lhs, const ptime rhs) noexcept
|
||||||
|
|
Loading…
Reference in a new issue