Verbose and redundant.
Refactor off into its own function.
Rewriting existing valid_num_str would be a PitA, and besides, why lose the ability to use it elsewhere?
This can wait until invalid Waypoints throw rather than set coords to (0,0).
bool valid_line -> unsigned char invalid_line to throw.
The initial if statements could also be refactored away as part of this, but would result in an extra function call. Would there be a performance hit, however tiny, in practice?
https://github.com/yakra/DataProcessing/blob/3c6595a96ac3ea53afcfbfbcbd951eea47165b72/siteupdate/cplusplus/classes/Waypoint/Waypoint.cpp#L69-L90
Verbose and redundant. Refactor off into its own function. Rewriting existing
valid_num_str
would be a PitA, and besides, why lose the ability to use it elsewhere?This can wait until invalid Waypoints
throw
rather than set coords to (0,0).bool valid_line
->unsigned char invalid_line
to throw.