Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change constants initialization [11867] #2024

Merged
merged 1 commit into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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