/src/Fast-DDS/src/cpp/rtps/common/ChangeComparison.hpp
Line | Count | Source |
1 | | // Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | // you may not use this file except in compliance with the License. |
5 | | // You may obtain a copy of the License at |
6 | | // |
7 | | // http://www.apache.org/licenses/LICENSE-2.0 |
8 | | // |
9 | | // Unless required by applicable law or agreed to in writing, software |
10 | | // distributed under the License is distributed on an "AS IS" BASIS, |
11 | | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | // See the License for the specific language governing permissions and |
13 | | // limitations under the License. |
14 | | |
15 | | /** |
16 | | * @file ChangeComparison.hpp |
17 | | */ |
18 | | |
19 | | #ifndef _RTPS_COMMON_CHANGECOMPARISON_HPP |
20 | | #define _RTPS_COMMON_CHANGECOMPARISON_HPP |
21 | | |
22 | | #include <fastdds/rtps/common/CacheChange.hpp> |
23 | | |
24 | | namespace eprosima { |
25 | | namespace fastdds { |
26 | | namespace rtps { |
27 | | |
28 | | inline bool history_order_cmp( |
29 | | const CacheChange_t* lhs, |
30 | | const CacheChange_t* rhs) |
31 | 0 | { |
32 | 0 | return lhs->writerGUID == rhs->writerGUID ? |
33 | 0 | lhs->sequenceNumber < rhs->sequenceNumber : |
34 | 0 | lhs->sourceTimestamp < rhs->sourceTimestamp; |
35 | 0 | } |
36 | | |
37 | | } /* namespace rtps */ |
38 | | } /* namespace fastdds */ |
39 | | } /* namespace eprosima */ |
40 | | |
41 | | #endif // _RTPS_COMMON_CHANGECOMPARISON_HPP |