mirror of
https://github.com/transmission/transmission.git
synced 2026-04-28 04:34:02 +01:00
Make some utility functions return std::string to simplify code (#2368)
* tr_formatter_speed_KBps returns std::string * tr_formatter_mem_B returns std::string * tr_formatter_size_B returns std::string * tr_strpercent/tr_strratio returns std::string
This commit is contained in:
@@ -200,11 +200,10 @@ bool tr_metaInfoBuilderSetPieceSize(tr_metainfo_builder* b, uint32_t bytes)
|
||||
{
|
||||
if (!isValidPieceSize(bytes))
|
||||
{
|
||||
char wanted[32];
|
||||
char gotten[32];
|
||||
tr_formatter_mem_B(wanted, bytes, sizeof(wanted));
|
||||
tr_formatter_mem_B(gotten, b->pieceSize, sizeof(gotten));
|
||||
tr_logAddError(_("Failed to set piece size to %s, leaving it at %s"), wanted, gotten);
|
||||
tr_logAddError(
|
||||
_("Failed to set piece size to %s, leaving it at %s"),
|
||||
tr_formatter_mem_B(bytes).c_str(),
|
||||
tr_formatter_mem_B(b->pieceSize).c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user