yaml-cpp
yaml-cpp copied to clipboard
YAML::convert<>::decode argument name rhs is confusing
In the tutorial, the example of YAML::convert<> defines a method static bool decode(const Node& node, Vec3& rhs) .
From my understanding, the variable name rhs is commonly used for the right hand side of a binary operator during operator overloading (e.g. for operator/, operator=, operator== etc), which is often (typically unless rvalue ref in operator= (?)) a read-only input argument to the operator.
While "rhs" is a valid variable name, using it for something which is the output of a method is (to me) somewhat confusing. I propose renaming it res or out in all instances of decode, in the tutorial and convert.h.
Sounds good, feel free to submit a PR.