mirror of
https://github.com/transmission/transmission.git
synced 2025-12-25 04:45:56 +00:00
Fix building transmission with C++23 (#6832)
* fix: operator== should return bool in tr_strbuf Fixes build error with C++20/C++23 error: return type 'auto' of selected 'operator==' function for rewritten '!=' comparison is not 'bool' Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: explicitly specify Blocklist::size() return type as size_t Fixes building with C++20/C++23 error: no matching function for call to 'size' function 'size' with deduced return type cannot be used before it is defined Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: wrap runtime format strings with fmt::runtime in library, daemon and cli fmt::format_string ctor is consteval with C++20 See https://github.com/fmtlib/fmt/issues/2438 Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: wrap runtime format strings with fmt::runtime for GTK client Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: allow to override C and CXX standard via cmdline or env Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: add job to check if transmission compiles with C++23 Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * Address code review by mikedld Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix new found fmt build errors Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * Address code review by tearfur Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: make tr_net_init_mgr singleton buildable with C++23 Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> --------- Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
committed by
GitHub
parent
24f58f70ee
commit
7e87adcd91
@@ -179,7 +179,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
tr_logAddError(fmt::format(_("Unsupported URL: '{url}'"), fmt::arg("url", scrape_sv)));
|
||||
tr_logAddError(fmt::format(fmt::runtime(_("Unsupported URL: '{url}'")), fmt::arg("url", scrape_sv)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
tr_logAddWarn(fmt::format(_("Unsupported URL: '{url}'"), fmt::arg("url", announce_sv)));
|
||||
tr_logAddWarn(fmt::format(fmt::runtime(_("Unsupported URL: '{url}'")), fmt::arg("url", announce_sv)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -890,7 +890,10 @@ void on_announce_error(tr_tier* tier, char const* err, tr_announce_event e)
|
||||
{
|
||||
tr_logAddErrorTier(
|
||||
tier,
|
||||
fmt::format(_("Announce error: {error} ({url})"), fmt::arg("error", err), fmt::arg("url", announce_url)));
|
||||
fmt::format(
|
||||
fmt::runtime(_("Announce error: {error} ({url})")),
|
||||
fmt::arg("error", err),
|
||||
fmt::arg("url", announce_url)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -899,10 +902,10 @@ void on_announce_error(tr_tier* tier, char const* err, tr_announce_event e)
|
||||
tr_logAddWarnTier(
|
||||
tier,
|
||||
fmt::format(
|
||||
tr_ngettext(
|
||||
fmt::runtime(tr_ngettext(
|
||||
"Announce error: {error} (Retrying in {count} second) ({url})",
|
||||
"Announce error: {error} (Retrying in {count} seconds) ({url})",
|
||||
interval),
|
||||
interval)),
|
||||
fmt::arg("error", err),
|
||||
fmt::arg("count", interval),
|
||||
fmt::arg("url", announce_url)));
|
||||
|
||||
Reference in New Issue
Block a user