fix: sonarcloud warnings (#2815)

* fix: add default case to switch statement

* fix: remove redundant static specifier

* fix: use std::optional.value_or

* fix: make type of variable pointer-to-const

* refactor: move log state into a struct

* refactor: make tr_peerMgr constructor explicit

* fix: make type of variable pointer-to-const

* fix: replace insert with try_emplace

* fix: implicit conversion may lose precision

* fix: use init-statement to reduce variable scope

* chore: mark unused return value with (void)
This commit is contained in:
Charles Kerr
2022-03-25 00:24:04 -05:00
committed by GitHub
parent 0a8cfba3b3
commit b94c6796c8
8 changed files with 55 additions and 55 deletions

View File

@@ -271,8 +271,7 @@ void setForegroundColor(Gtk::CellRendererText* renderer, tr_log_level level)
renderer->property_foreground() = "forestgreen";
break;
case TR_LOG_INFO:
case TR_LOG_OFF:
default:
renderer->property_foreground_set() = false;
break;
}