mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
fix: sonarcloud code smells (#2623)
* fix: make variable a pointer-to-const * fix: use init-statement to reduce variable scope * fix: implicit conversion from long to int * fix: refactor to not nest more than 3 if|for|do|while|switch statements * fix: make tr_session::setSocketTos() const * fix: use array.prototype.some instead of a for loop * refactor: use nullptr instead of NULL * fix: oops
This commit is contained in:
@@ -468,7 +468,7 @@ void TorrentUrlChooserDialog::onOpenURLResponse(int response, Glib::RefPtr<Sessi
|
||||
}
|
||||
else if (response == Gtk::RESPONSE_ACCEPT)
|
||||
{
|
||||
auto* const e = static_cast<Gtk::Entry*>(get_data("url-entry"));
|
||||
auto const* const e = static_cast<Gtk::Entry*>(get_data("url-entry"));
|
||||
auto const url = gtr_str_strip(e->get_text());
|
||||
|
||||
if (url.empty())
|
||||
|
||||
Reference in New Issue
Block a user