Skip to content

Commit

Permalink
Change constants initialization (#2024)
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
  • Loading branch information
richiware authored Jun 24, 2021
1 parent 392defc commit aa183e8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion include/fastdds/rtps/common/SequenceNumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions include/fastdds/rtps/common/Time_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions include/fastdds/rtps/common/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -153,10 +153,10 @@ inline std::ostream& operator <<(
return output << static_cast<int>(pv.m_major) << "." << static_cast<int>(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;

Expand Down

0 comments on commit aa183e8

Please sign in to comment.