diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-05-27 13:00:04 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-05-27 13:00:50 +1000 |
| commit | b5693c6253bd99af5d27488562f9598c1c45c85d (patch) | |
| tree | 6bf3d0292f31b06e589a2256cd96500cf9e9accc /src/string_utils.hh | |
| parent | 2617f5e022b8eaaaf9f051e0c1f249c276e3e9fc (diff) | |
Refactor option_from_string to return directly the option value
Diffstat (limited to 'src/string_utils.hh')
| -rw-r--r-- | src/string_utils.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string_utils.hh b/src/string_utils.hh index 6f0124a1..bd803536 100644 --- a/src/string_utils.hh +++ b/src/string_utils.hh @@ -66,7 +66,7 @@ int str_to_int(StringView str); // throws on error Optional<int> str_to_int_ifp(StringView str); inline String option_to_string(StringView opt) { return opt.str(); } -inline void option_from_string(StringView str, String& opt) { opt = str.str(); } +inline String option_from_string(Meta::Type<String>, StringView str) { return str.str(); } inline bool option_add(String& opt, StringView val) { opt += val; return not val.empty(); } template<size_t N> |
