diff --git a/include/fastdds/rtps/common/SequenceNumber.h b/include/fastdds/rtps/common/SequenceNumber.h index ae0fda2b55b..910141d6389 100644 --- a/include/fastdds/rtps/common/SequenceNumber.h +++ b/include/fastdds/rtps/common/SequenceNumber.h @@ -290,7 +290,7 @@ inline SequenceNumber_t operator -( #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -const SequenceNumber_t c_SequenceNumber_Unknown(-1, 0); +const SequenceNumber_t c_SequenceNumber_Unknown{-1, 0}; #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC diff --git a/include/fastdds/rtps/common/Time_t.h b/include/fastdds/rtps/common/Time_t.h index d5bd80cc5f1..6620c7c009b 100644 --- a/include/fastdds/rtps/common/Time_t.h +++ b/include/fastdds/rtps/common/Time_t.h @@ -441,9 +441,9 @@ static inline Time_t operator -( #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -const Time_t c_RTPSTimeInfinite(0x7fffffff, 0xffffffff); -const Time_t c_RTPSTimeZero(0, 0); -const Time_t c_RTPSTimeInvalid(-1, 0xffffffff); +const Time_t c_RTPSTimeInfinite{0x7fffffff, 0xffffffff}; +const Time_t c_RTPSTimeZero{0, 0}; +const Time_t c_RTPSTimeInvalid{-1, 0xffffffff}; } // namespace rtps @@ -662,11 +662,11 @@ static inline Time_t operator -( #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC //! Time_t (Duration_t) representing an infinite time. DONT USE IT IN CONSTRUCTORS -const Time_t c_TimeInfinite(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS); +const Time_t c_TimeInfinite{TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS}; //! Time_t (Duration_t) representing a zero time. DONT USE IT IN CONSTRUCTORS -const Time_t c_TimeZero(0, 0); +const Time_t c_TimeZero{0, 0}; //! Time_t (Duration_t) representing an invalid time. DONT USE IT IN CONSTRUCTORS -const Time_t c_TimeInvalid(-1, TIME_T_INFINITE_NANOSECONDS); +const Time_t c_TimeInvalid{-1, TIME_T_INFINITE_NANOSECONDS}; } // namespace fastrtps } // namespace eprosima diff --git a/include/fastdds/rtps/common/Types.h b/include/fastdds/rtps/common/Types.h index c770ad04d7a..c0ba598d14e 100644 --- a/include/fastdds/rtps/common/Types.h +++ b/include/fastdds/rtps/common/Types.h @@ -108,8 +108,8 @@ struct RTPS_DllAPI ProtocolVersion_t octet m_minor; ProtocolVersion_t(): #if HAVE_SECURITY - // As imposed by DDSSEC11-93 - ProtocolVersion_t(2, 3) + // As imposed by DDSSEC11-93 + ProtocolVersion_t(2, 3) #else ProtocolVersion_t(2, 2) #endif // if HAVE_SECURITY @@ -153,10 +153,10 @@ inline std::ostream& operator <<( return output << static_cast(pv.m_major) << "." << static_cast(pv.m_minor); } -const ProtocolVersion_t c_ProtocolVersion_2_0(2, 0); -const ProtocolVersion_t c_ProtocolVersion_2_1(2, 1); -const ProtocolVersion_t c_ProtocolVersion_2_2(2, 2); -const ProtocolVersion_t c_ProtocolVersion_2_3(2, 3); +const ProtocolVersion_t c_ProtocolVersion_2_0{2, 0}; +const ProtocolVersion_t c_ProtocolVersion_2_1{2, 1}; +const ProtocolVersion_t c_ProtocolVersion_2_2{2, 2}; +const ProtocolVersion_t c_ProtocolVersion_2_3{2, 3}; const ProtocolVersion_t c_ProtocolVersion;