diff options
| author | Timothy D. Prime <tdprime@teleosmedia.com> | 2017-01-26 10:11:37 -0800 |
|---|---|---|
| committer | Timothy D. Prime <tdprime@teleosmedia.com> | 2017-01-26 10:11:37 -0800 |
| commit | 99f584376e53aad34b149ebf5d720fd7271f1c81 (patch) | |
| tree | fb70de4ce90730c18872969597dc40c2fc6ccd0a /src/rpc/core_rpc_server.cpp | |
| parent | ad91ffe7e5e52c4b769c12616f6350396306dceb (diff) | |
| download | monzero-core-99f584376e53aad34b149ebf5d720fd7271f1c81.tar.gz monzero-core-99f584376e53aad34b149ebf5d720fd7271f1c81.tar.xz monzero-core-99f584376e53aad34b149ebf5d720fd7271f1c81.zip | |
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().
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
| -rw-r--r-- | src/rpc/core_rpc_server.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 7d896e491..8ae1255c2 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -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; |
