Skip to content

Commit

Permalink
Add missing thread include (#4045)
Browse files Browse the repository at this point in the history
* Refs #19887: Add missing thread include

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #19887. Update `ReturnCode_t` comparison operators.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #19887: Uncrustify

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

---------

Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Co-authored-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 6390715)

# Conflicts:
#	test/unittest/dds/publisher/DataWriterTests.cpp
#	test/unittest/rtps/flowcontrol/FlowControllerPublishModesOnAsyncTests.cpp
#	test/unittest/rtps/flowcontrol/FlowControllerPublishModesOnLimitedAsyncTests.cpp
#	test/unittest/rtps/flowcontrol/FlowControllerPublishModesOnPureSyncTests.cpp
#	test/unittest/rtps/flowcontrol/FlowControllerPublishModesOnSyncTests.cpp
#	test/unittest/rtps/flowcontrol/FlowControllerSchedulersTests.cpp
  • Loading branch information
EduPonz authored and cferreiragonz committed Dec 5, 2023
1 parent e8464b6 commit 69ef2f5
Show file tree
Hide file tree
Showing 31 changed files with 587 additions and 322 deletions.
28 changes: 20 additions & 8 deletions include/fastrtps/types/TypesBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,32 @@ class RTPS_DllAPI ReturnCode_t

};

template<class T>
typename std::enable_if<std::is_arithmetic<T>::value || std::is_enum<T>::value, bool>::type
operator ==(
T a,
RTPS_DllAPI inline bool operator ==(
ReturnCode_t::ReturnCodeValue a,
const ReturnCode_t& b)
{
return b.operator ==(
a);
}

template<class T>
typename std::enable_if<std::is_arithmetic<T>::value || std::is_enum<T>::value, bool>::type
operator !=(
T a,
RTPS_DllAPI inline bool operator !=(
ReturnCode_t::ReturnCodeValue a,
const ReturnCode_t& b)
{
return b.operator !=(
a);
}

RTPS_DllAPI inline bool operator ==(
uint32_t a,
const ReturnCode_t& b)
{
return b.operator ==(
a);
}

RTPS_DllAPI inline bool operator !=(
uint32_t a,
const ReturnCode_t& b)
{
return b.operator !=(
Expand Down
13 changes: 7 additions & 6 deletions test/blackbox/common/BlackboxTestsDeadlineQos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "ReqRepAsReliableHelloWorldRequester.hpp"
#include "ReqRepAsReliableHelloWorldReplier.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/utils/TimeConversion.h>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "ReqRepAsReliableHelloWorldReplier.hpp"
#include "ReqRepAsReliableHelloWorldRequester.hpp"

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;

Expand Down
10 changes: 6 additions & 4 deletions test/blackbox/common/BlackboxTestsPubSubFlowControllers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "PubSubWriterReader.hpp"
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include <gtest/gtest.h>

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
9 changes: 5 additions & 4 deletions test/blackbox/common/BlackboxTestsPubSubFragments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <thread>

#include <fastdds/dds/log/Log.hpp>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <rtps/transport/test_UDPv4Transport.h>

using namespace eprosima::fastrtps;
Expand Down
9 changes: 5 additions & 4 deletions test/blackbox/common/BlackboxTestsPubSubHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@
// limitations under the License.

#include <atomic>
#include <thread>
#include <tuple>

#include "BlackboxTests.hpp"
#include <gtest/gtest.h>

#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

#include <fastrtps/xmlparser/XMLProfileManager.h>
#include <rtps/transport/test_UDPv4Transport.h>
#include <gtest/gtest.h>

using namespace eprosima::fastrtps;
using namespace eprosima::fastdds::rtps;
Expand Down
9 changes: 5 additions & 4 deletions test/blackbox/common/BlackboxTestsReliability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/utils/TimeConversion.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <rtps/transport/test_UDPv4Transport.h>

using namespace eprosima::fastrtps;
Expand Down
13 changes: 5 additions & 8 deletions test/blackbox/common/DDSBlackboxTestsContentFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,23 @@
// limitations under the License.

#include <atomic>
#include <thread>

#include <gtest/gtest.h>

#include <fastdds/dds/subscriber/DataReader.hpp>
#include <fastdds/dds/subscriber/Subscriber.hpp>
#include <fastdds/dds/subscriber/qos/DataReaderQos.hpp>

#include <fastdds/dds/subscriber/Subscriber.hpp>
#include <fastdds/rtps/transport/test_UDPv4TransportDescriptor.h>

#include <fastrtps/attributes/LibrarySettingsAttributes.h>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

#include "../types/HelloWorldTypeObject.h"
#include "../types/TestRegression3361PubSubTypes.h"
#include "../types/TestRegression3361TypeObject.h"
#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

namespace eprosima {
namespace fastdds {
Expand Down
10 changes: 6 additions & 4 deletions test/blackbox/common/DDSBlackboxTestsDataReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubParticipant.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include <gtest/gtest.h>

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
15 changes: 8 additions & 7 deletions test/blackbox/common/DDSBlackboxTestsDataSharing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"
#include <fstream>
#include <sstream>
#include <thread>

#include <fastrtps/log/Log.h>
#include <gtest/gtest.h>

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <fastrtps/log/Log.h>
#include <fastrtps/transport/test_UDPv4TransportDescriptor.h>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include <sstream>
#include <fstream>
#include <gtest/gtest.h>
#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
1 change: 1 addition & 0 deletions test/blackbox/common/DDSBlackboxTestsListeners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#include <set>
#include <thread>
#include <vector>

#include <fastdds/dds/core/condition/GuardCondition.hpp>
Expand Down
11 changes: 6 additions & 5 deletions test/blackbox/common/DDSBlackboxTestsOwnershipQos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/xmlparser/XMLProfileManager.h>
#include <fastrtps/transport/test_UDPv4TransportDescriptor.h>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
14 changes: 8 additions & 6 deletions test/blackbox/common/DDSBlackboxTestsPersistence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"
#include <thread>

#include <gtest/gtest.h>

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "ReqRepAsReliableHelloWorldRequester.hpp"
#include "ReqRepAsReliableHelloWorldReplier.hpp"
#include <fastrtps/xmlparser/XMLProfileManager.h>
#include <fastrtps/log/Log.h>

#include <gtest/gtest.h>
#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "ReqRepAsReliableHelloWorldReplier.hpp"
#include "ReqRepAsReliableHelloWorldRequester.hpp"

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
Loading

0 comments on commit 69ef2f5

Please sign in to comment.