mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-01-03 06:21:08 +00:00
style: add braces to if and remove additional else
This commit is contained in:
parent
321364c7c2
commit
83bf83b6dd
@ -29,8 +29,9 @@ inline void resize_impl(T& container, std::size_t N, std::true_type)
|
||||
template<typename T>
|
||||
inline void resize_impl(T& container, std::size_t N, std::false_type)
|
||||
{
|
||||
if(container.size() >= N) return;
|
||||
else throw std::invalid_argument("not resizable type");
|
||||
if(container.size() >= N) {return;}
|
||||
|
||||
throw std::invalid_argument("not resizable type");
|
||||
}
|
||||
|
||||
} // detail
|
||||
@ -38,8 +39,9 @@ inline void resize_impl(T& container, std::size_t N, std::false_type)
|
||||
template<typename T>
|
||||
inline void resize(T& container, std::size_t N)
|
||||
{
|
||||
if(container.size() == N) return;
|
||||
else return detail::resize_impl(container, N, detail::has_resize_method<T>());
|
||||
if(container.size() == N) {return;}
|
||||
|
||||
return detail::resize_impl(container, N, detail::has_resize_method<T>());
|
||||
}
|
||||
|
||||
namespace detail
|
||||
@ -73,7 +75,5 @@ T from_string(const std::string& str, U&& opt)
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}// toml
|
||||
#endif // TOML11_UTILITY
|
||||
|
Loading…
Reference in New Issue
Block a user