mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-14 14:59:52 -04:00
Fix some clang-tidy issues
This commit is contained in:
parent
1f20b02b68
commit
db181acba7
@ -40,7 +40,7 @@ bool stream_is_fancy_terminal(std::ostream& os) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
auto term = ::getenv("TERM");
|
auto term = ::getenv("TERM");
|
||||||
return term && term[0] && ::strcmp(term, "dumb");
|
return term && term[0] != '\0' && ::strcmp(term, "dumb") != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
char const* terminal_color(termcolor color) {
|
char const* terminal_color(termcolor color) {
|
||||||
|
@ -63,15 +63,15 @@ size_t parse_size_with_unit(const std::string& str) {
|
|||||||
case 't':
|
case 't':
|
||||||
case 'T':
|
case 'T':
|
||||||
size <<= 10;
|
size <<= 10;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
case 'g':
|
case 'g':
|
||||||
case 'G':
|
case 'G':
|
||||||
size <<= 10;
|
size <<= 10;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
case 'm':
|
case 'm':
|
||||||
case 'M':
|
case 'M':
|
||||||
size <<= 10;
|
size <<= 10;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
case 'k':
|
case 'k':
|
||||||
case 'K':
|
case 'K':
|
||||||
size <<= 10;
|
size <<= 10;
|
||||||
|
@ -239,7 +239,7 @@ class load_adaptive_policy {
|
|||||||
|
|
||||||
load_adaptive_policy(size_t workers)
|
load_adaptive_policy(size_t workers)
|
||||||
: sem_(workers)
|
: sem_(workers)
|
||||||
, max_throttled_(workers - 1) {}
|
, max_throttled_(static_cast<int>(workers) - 1) {}
|
||||||
|
|
||||||
void start_task() { sem_.acquire(); }
|
void start_task() { sem_.acquire(); }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user