mirror of
https://github.com/transmission/transmission.git
synced 2025-12-26 21:29:18 +00:00
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:
@@ -369,7 +369,7 @@ void onBufferGotData(evbuffer* /*buf*/, evbuffer_cb_info const* info, void* vtas
|
||||
return;
|
||||
}
|
||||
|
||||
auto* const session = task->session;
|
||||
auto const* const session = task->session;
|
||||
auto const lock = session->unique_lock();
|
||||
|
||||
auto* const webseed = task->webseed;
|
||||
@@ -427,8 +427,7 @@ void onPartialDataFetched(tr_web::FetchResponse const& web_response)
|
||||
return;
|
||||
}
|
||||
|
||||
auto* const tor = webseed->getTorrent();
|
||||
if (tor == nullptr)
|
||||
if (auto const* const tor = webseed->getTorrent(); tor == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user