fix: add missing const specifier to some of get()s

This commit is contained in:
ToruNiina 2019-03-20 00:37:13 +09:00
parent 39bc3c64fe
commit 20ba57e389

View File

@ -113,7 +113,7 @@ inline std::string get(value&& v)
template<typename T, typename std::enable_if<
detail::is_chrono_duration<T>::value, std::nullptr_t>::type = nullptr>
inline T get(value& v)
inline T get(const value& v)
{
return std::chrono::duration_cast<T>(
std::chrono::nanoseconds(v.cast<value_t::LocalTime>()));
@ -125,7 +125,7 @@ inline T get(value& v)
template<typename T, typename std::enable_if<
std::is_same<std::chrono::system_clock::time_point, T>::value,
std::nullptr_t>::type = nullptr>
inline T get(value& v)
inline T get(const value& v)
{
switch(v.type())
{