mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-20 05:41:14 -03:00
[clang-tidy] Convert C casts to C++ ones
Found with google-readability-casting Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
ridiculousfish
parent
7f62e30731
commit
0dfa7421f3
@@ -319,7 +319,7 @@ static bool parse_debug_level_flag() {
|
||||
long tmp = strtol(optarg, &end, 10);
|
||||
|
||||
if (tmp >= 0 && tmp <= 10 && !*end && !errno) {
|
||||
debug_level = (int)tmp;
|
||||
debug_level = static_cast<int>(tmp);
|
||||
} else {
|
||||
std::fwprintf(stderr, _(L"Invalid value '%s' for debug-level flag\n"), optarg);
|
||||
return false;
|
||||
@@ -333,7 +333,7 @@ static bool parse_debug_frames_flag() {
|
||||
char *end;
|
||||
long tmp = strtol(optarg, &end, 10);
|
||||
if (tmp > 0 && tmp <= 128 && !*end && !errno) {
|
||||
set_debug_stack_frames((int)tmp);
|
||||
set_debug_stack_frames(static_cast<int>(tmp));
|
||||
} else {
|
||||
std::fwprintf(stderr, _(L"Invalid value '%s' for debug-stack-frames flag\n"), optarg);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user