gz-math
gz-math copied to clipboard
non-const `Color::operator[]` should return mutable reference
Environment
- OS Version: Ubuntu 22.04
- Source or binary build?
main
, e0193a59072cc4a083dedaecf05957d059997b02
Description
- Expected behavior: To be able to mutate a component of
Color
usingoperator[]
- Actual behavior: Since it returns a value, any mutation is not applied to the component in
Color
https://github.com/gazebosim/gz-math/blob/e0193a59072cc4a083dedaecf05957d059997b02/include/gz/math/Color.hh#L162