diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-08-15 20:10:04 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-08-15 20:10:04 +0200 |
commit | aaa6e73c8ca6d60e943cb964605536eb78219db2 (patch) | |
tree | f5a0187925e646ef071d647efa7a5dac20501813 /src/server/shared/Packets/ByteBuffer.cpp | |
parent | 825c697a764017349ca94ecfca8f30a8365666c0 (diff) |
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
(cherry picked from commit d791afae1dfcfaf592326f787755ca32d629e4d3)
Diffstat (limited to 'src/server/shared/Packets/ByteBuffer.cpp')
-rw-r--r-- | src/server/shared/Packets/ByteBuffer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/shared/Packets/ByteBuffer.cpp b/src/server/shared/Packets/ByteBuffer.cpp index e99ace2a274..aff903f4846 100644 --- a/src/server/shared/Packets/ByteBuffer.cpp +++ b/src/server/shared/Packets/ByteBuffer.cpp @@ -23,6 +23,7 @@ #include "Util.h" #include <utf8.h> #include <sstream> +#include <cmath> #include <ctime> ByteBuffer::ByteBuffer(MessageBuffer&& buffer) : _rpos(0), _wpos(0), _storage(buffer.Move()) @@ -55,7 +56,7 @@ ByteBufferSourceException::ByteBufferSourceException(size_t pos, size_t size, ByteBufferInvalidValueException::ByteBufferInvalidValueException(char const* type, char const* value) { - message().assign(Trinity::StringFormat("Invalid %s value (%s) found in ByteBuffer", type, value)); + message().assign(Trinity::StringFormat("Invalid {} value ({}) found in ByteBuffer", type, value)); } ByteBuffer& ByteBuffer::operator>>(float& value) @@ -156,7 +157,7 @@ void ByteBuffer::print_storage() const o << read<uint8>(i) << " - "; o << " "; - TC_LOG_TRACE("network", "%s", o.str().c_str()); + TC_LOG_TRACE("network", "{}", o.str()); } void ByteBuffer::textlike() const @@ -173,7 +174,7 @@ void ByteBuffer::textlike() const o << buf; } o << " "; - TC_LOG_TRACE("network", "%s", o.str().c_str()); + TC_LOG_TRACE("network", "{}", o.str()); } void ByteBuffer::hexlike() const @@ -205,5 +206,5 @@ void ByteBuffer::hexlike() const o << buf; } o << " "; - TC_LOG_TRACE("network", "%s", o.str().c_str()); + TC_LOG_TRACE("network", "{}", o.str()); } |