diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2023-02-21 21:34:18 +0100 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2023-03-04 10:10:20 +0100 |
commit | 66c9c76151497638f1be2bb05ccc2d58d075fc2d (patch) | |
tree | ebafdebf63cccc72fa547376d86d935d5a85ad71 /src/core | |
parent | d62b9df5546bee65795188b4e4cbd8dc872887d7 (diff) | |
download | ccache-66c9c76151497638f1be2bb05ccc2d58d075fc2d.tar.gz |
refactor: Move Util::parse_size to util
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/mainoptions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/mainoptions.cpp b/src/core/mainoptions.cpp index 40db41dc..1fba40db 100644 --- a/src/core/mainoptions.cpp +++ b/src/core/mainoptions.cpp @@ -485,7 +485,7 @@ process_main_options(int argc, const char* const* argv) break; case TRIM_MAX_SIZE: - trim_max_size = Util::parse_size(arg); + trim_max_size = util::value_or_throw<Error>(util::parse_size(arg)); break; case TRIM_METHOD: @@ -657,7 +657,7 @@ process_main_options(int argc, const char* const* argv) } case 'M': { // --max-size - uint64_t size = Util::parse_size(arg); + uint64_t size = util::value_or_throw<Error>(util::parse_size(arg)); config.set_value_in_file(config.config_path(), "max_size", arg); if (size == 0) { PRINT_RAW(stdout, "Unset cache size limit\n"); |