MRPT / mrpt

:zap: The Mobile Robot Programming Toolkit (MRPT)
https://docs.mrpt.org/reference/latest/
BSD 3-Clause "New" or "Revised" License
1.93k stars 630 forks source link

Update the ExprTk library #1125

Closed ArashPartow closed 3 years ago

jlblancoc commented 3 years ago

All relevant unit tests passed, merging.

Thanks! :+1:

jlblancoc commented 3 years ago

Just in case this was a bug (?), please check these lines:

/home/jlblanco/code/mrpt/libs/expr/include/mrpt/3rdparty/exprtk.hpp:1931:29: warning: declaration of ‘exponent’ shadows a previous local [-Wshadow]
                   const int exponent = static_cast<int>(-std::distance(curr, itr));
                             ^~~~~~~~
/home/jlblanco/code/mrpt/libs/expr/include/mrpt/3rdparty/exprtk.hpp:1904:14: note: shadowed declaration is here
          int exponent = 0;
              ^~~~~~~~
ArashPartow commented 3 years ago

It's a different exponent. It's essentially the power to 10 the fractional part (which atm is in integer mode) needs to be multiplied with to make it the fractional part in the underlying type (double, float etc...).

I'll rename it so as to make it less confusing and so as not to trigger that diagnostic.

Thank-you for raising this issue.

jlblancoc commented 3 years ago

ok, thanks for clarifying :+1: