ros2 / urdf

Repository for URDF parsing code
BSD 3-Clause "New" or "Revised" License
9 stars 6 forks source link

Provide copy and move constructors for `model` #33

Closed dreuter closed 2 years ago

dreuter commented 2 years ago

In 4b73ae2998bec0db24aca07b0bf7fc37b8e4dae7 the copy and move constructors were accidentally disabled. This means that one must always wrap a urdf::Model into some form of pointer in order to pass it around or have it as a member.

This commit restores the copy and move constructors, such that one is able to pass the urdf::Model around as a normal variable.

See also: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rc-five

sloretz commented 2 years ago

CI (repos file build: --packages-above-and-dependencies urdf test: --packages-select urdf urdf_parser_plugin)

sloretz commented 2 years ago

Thanks for the PR!