Skip to content

Commit c6ca656

Browse files
Merge pull request #4 from Tobias-Fischer/patch-1
Fix Windows compilation
2 parents 7f56af4 + af8d567 commit c6ca656

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

plugins/RosoutPublisher/logs_table_model.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#include <unordered_map>
1111
#include <chrono>
1212

13+
#ifdef _WIN32
14+
#undef ERROR
15+
#endif
16+
1317
typedef std::chrono::high_resolution_clock::time_point TimePoint;
1418

1519

plugins/ros1_introspection/include/ros_type_introspection/details/conversion_impl.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ inline void checkLowerLimit(const From& from)
196196
template <typename From, typename To>
197197
inline void checkTruncation(const From& from)
198198
{
199-
if (!std::isnan(from) && from != static_cast<From>(static_cast<To>(from)))
199+
if (!std::isnan(static_cast<double>(from)) && from != static_cast<From>(static_cast<To>(from)))
200200
{
201201
throw RangeException("Floating point truncated 1");
202202
}

plugins/ros1_parsers/ros1_parser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ bool IntrospectionParser::parseMessage(MessageRef serialized_msg, double& timest
7171

7272
auto& series = getSeries(key);
7373

74-
if (!std::isnan(value) && !std::isinf(value))
74+
if (!std::isnan(static_cast<double>(value)) && !std::isinf(value))
7575
{
7676
series.pushBack({ timestamp, value });
7777
}

0 commit comments

Comments
 (0)