InsightSoftwareConsortium / ITKIsotropicWavelets

External Module for ITK, implementing Isotropic Wavelets and Riesz Filter for multiscale phase analysis.
Apache License 2.0
13 stars 11 forks source link

STYLE: Prefer error checked std::sto[id] over ato[if]. #95

Closed jhlegarreta closed 5 years ago

jhlegarreta commented 5 years ago

The ato[if] functions do not provide mechanisms for distinguishing between 0 and the error condition where the input can not be converted.

std::sto[id] provides exception handling and detects when an invalid string attempts to be converted to an [integer|double].

ato[if]()

The use of ato[if] in code can cause it to be subtly broken. ato[if] makes two very big assumptions indeed:

In agreement with: http://review.source.kitware.com/#/c/23738/

phcerdan commented 5 years ago

Great, thanks @jhlegarreta!