forked from HowardHinnant/date
Fix compilation error with GCC 5
GCC 5 complains that `operator-=` and `operator+=` are not constexpr. The `-` and `+` operator appear seem to be fine.
This commit is contained in:
committed by
Howard Hinnant
parent
b87eb970c1
commit
cb4bf26fc7
@ -3917,7 +3917,7 @@ make12(std::chrono::hours h) NOEXCEPT
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (h != hours{12})
|
if (h != hours{12})
|
||||||
h -= hours{12};
|
h = h - hours{12};
|
||||||
}
|
}
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
@ -3931,7 +3931,7 @@ make24(std::chrono::hours h, bool is_pm) NOEXCEPT
|
|||||||
if (is_pm)
|
if (is_pm)
|
||||||
{
|
{
|
||||||
if (h != hours{12})
|
if (h != hours{12})
|
||||||
h += hours{12};
|
h = h + hours{12};
|
||||||
}
|
}
|
||||||
else if (h == hours{12})
|
else if (h == hours{12})
|
||||||
h = hours{0};
|
h = hours{0};
|
||||||
|
Reference in New Issue
Block a user