Fast-DDS-Gen
Fast-DDS-Gen copied to clipboard
comparing floating point types in generator equality operator
here is my dataArray.idl contents:
struct dataPair
{
float real;
float img;
};
struct dataArray
{
dataPair dataPairs[64];
};
Code generated using fastddsgen version 3.0.1 : fastddsgen -cs -ppDisable -replace dataArray.idl
Compiling on Ubuntu 20.04 with gcc-13.3.0 with the flag -Wfloat-equal catches these errors: dataArray.cxx:85:20: error: comparing floating-point with '==' or '!=' is unsafe dataArray.cxx:86:18: error: comparing floating-point with '==' or '!=' is unsafe