mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-13 22:40:03 -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;
|
||||
}
|
||||
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) {
|
||||
|
@ -63,15 +63,15 @@ size_t parse_size_with_unit(const std::string& str) {
|
||||
case 't':
|
||||
case 'T':
|
||||
size <<= 10;
|
||||
// fallthrough
|
||||
[[fallthrough]];
|
||||
case 'g':
|
||||
case 'G':
|
||||
size <<= 10;
|
||||
// fallthrough
|
||||
[[fallthrough]];
|
||||
case 'm':
|
||||
case 'M':
|
||||
size <<= 10;
|
||||
// fallthrough
|
||||
[[fallthrough]];
|
||||
case 'k':
|
||||
case 'K':
|
||||
size <<= 10;
|
||||
|
@ -239,7 +239,7 @@ class load_adaptive_policy {
|
||||
|
||||
load_adaptive_policy(size_t workers)
|
||||
: sem_(workers)
|
||||
, max_throttled_(workers - 1) {}
|
||||
, max_throttled_(static_cast<int>(workers) - 1) {}
|
||||
|
||||
void start_task() { sem_.acquire(); }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user