|
From: Florent R. <f.r...@fr...> - 2023-07-18 09:29:52
|
Hi, Minor remark about template<typename T> bool SGPropertyNode::tie(const SGRawValue<T> &rawValue, bool useDefault) AFAICS, the following line at simgear/simgear/props/props.cxx:4204 T old_val = SGRawValue<T>::DefaultValue(); could be simply T old_val; (unless there is an intent to rely on a side effect of SGRawValue<T>::DefaultValue(), which I highly doubt—a comment would be warranted if that were the case!). Indeed, old_val is only used when useDefault is true and, in this case, immediately overwritten with getValue<T>(exclusive) (cf. line 4206). Not a big deal, but it makes the code harder to understand IMHO. Regards -- Florent |