From ac5ddccc6bdf07402cfea84cbe393b5be5a3dc21 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 24 Nov 2024 11:54:42 -0500 Subject: [PATCH] wsd: Use litteral character for readability Change-Id: I71ace6b25b4c3fb4bedb6709a6c06e5b6c5d51b7 Signed-off-by: Ashod Nakashian --- wsd/TileCache.hpp | 2 +- wsd/TileDesc.hpp | 9 +++++---- wsd/TraceFile.hpp | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/wsd/TileCache.hpp b/wsd/TileCache.hpp index 4d68431a88df..7ebd59bb3943 100644 --- a/wsd/TileCache.hpp +++ b/wsd/TileCache.hpp @@ -205,7 +205,7 @@ struct TileData os << "deltas: "; for (size_t i = 0; i < _wids.size(); ++i) { - os << i << ": " << _wids[i] << " -> " << _offsets[i] << " "; + os << i << ": " << _wids[i] << " -> " << _offsets[i] << ' '; } os << (tooLarge() ? "too-large " : ""); } diff --git a/wsd/TileDesc.hpp b/wsd/TileDesc.hpp index a2184a06b029..5dea22d7a546 100644 --- a/wsd/TileDesc.hpp +++ b/wsd/TileDesc.hpp @@ -441,10 +441,11 @@ class TileCombined _tileWidth <= 0 || _tileHeight <= 0) { - throw BadArgumentException("Invalid tilecombine descriptor. Elements: " + - std::to_string(_part) + " " + std::to_string(_mode) + " " + - std::to_string(_width) + " " + std::to_string(_height) + " " + - std::to_string(_tileWidth) + " " + std::to_string(_tileHeight)); + throw BadArgumentException( + "Invalid tilecombine descriptor. Elements: " + std::to_string(_part) + ' ' + + std::to_string(_mode) + ' ' + std::to_string(_width) + ' ' + + std::to_string(_height) + ' ' + std::to_string(_tileWidth) + ' ' + + std::to_string(_tileHeight)); } StringVector positionXtokens(StringVector::tokenize(tilePositionsX, ',')); diff --git a/wsd/TraceFile.hpp b/wsd/TraceFile.hpp index c9de6bed5e3c..dbbfcdf412a9 100644 --- a/wsd/TraceFile.hpp +++ b/wsd/TraceFile.hpp @@ -274,7 +274,7 @@ class TraceFileWriter if (_compress) { _deflater.write(&delim, 1); - _deflater << "+" << deltaT; + _deflater << '+' << deltaT; _deflater.write(&delim, 1); _deflater << id; _deflater.write(&delim, 1); @@ -286,7 +286,7 @@ class TraceFileWriter else { _stream.write(&delim, 1); - _stream << "+" << deltaT; + _stream << '+' << deltaT; _stream.write(&delim, 1); _stream << id; _stream.write(&delim, 1);