mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 19:10:11 +08:00
fix: add missing const specifier to some of get()s
This commit is contained in:
@@ -113,7 +113,7 @@ inline std::string get(value&& v)
|
|||||||
|
|
||||||
template<typename T, typename std::enable_if<
|
template<typename T, typename std::enable_if<
|
||||||
detail::is_chrono_duration<T>::value, std::nullptr_t>::type = nullptr>
|
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>(
|
return std::chrono::duration_cast<T>(
|
||||||
std::chrono::nanoseconds(v.cast<value_t::LocalTime>()));
|
std::chrono::nanoseconds(v.cast<value_t::LocalTime>()));
|
||||||
@@ -125,7 +125,7 @@ inline T get(value& v)
|
|||||||
template<typename T, typename std::enable_if<
|
template<typename T, typename std::enable_if<
|
||||||
std::is_same<std::chrono::system_clock::time_point, T>::value,
|
std::is_same<std::chrono::system_clock::time_point, T>::value,
|
||||||
std::nullptr_t>::type = nullptr>
|
std::nullptr_t>::type = nullptr>
|
||||||
inline T get(value& v)
|
inline T get(const value& v)
|
||||||
{
|
{
|
||||||
switch(v.type())
|
switch(v.type())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user