mirror of
https://github.com/monero-project/monero.git
synced 2026-01-06 09:44:03 -08:00
Fix invalid + of std::string and int
These warnings were emitted by clang++, and they are real bugs.
src/rpc/core_rpc_server.cpp:208:58: warning: adding 'uint64_t'
(aka 'unsigned long') to a string does not append to the string
[-Wstring-plus-int]
res.status = "Error retrieving block at height " + height;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
The obvious intent is achieved by using std::to_string().
This commit is contained in:
@@ -205,7 +205,7 @@ namespace cryptonote
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
res.status = "Error retrieving block at height " + height;
|
||||
res.status = "Error retrieving block at height " + std::to_string(height);
|
||||
return true;
|
||||
}
|
||||
std::list<transaction> txs;
|
||||
|
||||
Reference in New Issue
Block a user