From bbb4c58ae448b0452093ea502e6d73f256f0691e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:50:55 +0200 Subject: [PATCH] Add unsigned specification to literals (#5125) (#5149) (#5162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: JesusPoderoso (cherry picked from commit daef9380857af12aad6a4ffd822fb5d6bf2b1b02) Co-authored-by: Jesús Poderoso <120394830+JesusPoderoso@users.noreply.github.com> --- include/fastdds/rtps/common/InstanceHandle.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fastdds/rtps/common/InstanceHandle.hpp b/include/fastdds/rtps/common/InstanceHandle.hpp index a710f3b3c39..a60220aa1f7 100644 --- a/include/fastdds/rtps/common/InstanceHandle.hpp +++ b/include/fastdds/rtps/common/InstanceHandle.hpp @@ -301,7 +301,7 @@ inline std::ostream& operator <<( { ss << (int)iHandle.value[i] << "."; } - ss << (int)iHandle.value[15] << std::dec; + ss << (int)iHandle.value[15u] << std::dec; return output << ss.str(); } @@ -334,9 +334,9 @@ inline std::istream& operator >>( input.setstate(std::ios_base::failbit); } - iHandle.value[0] = static_cast(hex); + iHandle.value[0u] = static_cast(hex); - for (int i = 1; i < 16; ++i) + for (uint8_t i = 1; i < 16; ++i) { input >> point >> hex; if ( point != '.' || hex > 255 )