Using a bool to indicate whether a mutable in-out param was written to is fine in legacy code, but otherwise confusing and brittle:
- Sometimes the in-out-param is written to, even when the function returns
false, like inParseDouble. - Call sites must manually check the return value
Fix those issues by returning std::optional<_> from ParseDouble (and a few other functions).
This refactor is a style cleanup and does not change any behavior.