LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.73k stars 1.13k forks source link

Rs/posemath refactor #2999

Open rmu75 opened 1 week ago

rmu75 commented 1 week ago

posemath.h: replace some macros with function templates.

posemath.h contains some macros for conversion between C structs and C++ classes. Those macros are named like 'toLine' and don't follow usual convention that #define should use CAPITALIZED_NAMES. To avoid name collisions, replace macros with function templates and make sure those are only enabled if compiled as C++.

rmu75 commented 1 week ago

fixes #2986 and #2995