Skip to content

Commit

Permalink
COMP: Fix windows build error related to non existing std::isnan func…
Browse files Browse the repository at this point in the history
…tion

std::isnan has been introduced in C++11 and Visual Studio 2008 doesn't
support it.
  • Loading branch information
jcfr committed May 15, 2015
1 parent a152435 commit 0dd3268
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BRAINSCommonLib/DWIMetaDataDictionaryValidator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void DWIMetaDataDictionaryValidator::GenericSetDoubleVector(const std::vector<do
* Also, itkNrrdIO handles the correct permutation based on the "kinds" field in image. It sets the thickness value
* for the 3rd space/domain.
*/
if( !std::isnan(values[index]) )
if( !vnl_math_isnan(values[index]) )
{
itk::EncapsulateMetaData< double >(this->m_dict,
currKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ int main( int argc, char *argv[] )
{
for(size_t i = 0 ; i < outThicknesses.size(); ++i)
{
if( std::isnan(outThicknesses[i]) )
if( vnl_math_isnan(outThicknesses[i]) )
{
if( !std::isnan(tempThickness[i]) )
if( !vnl_math_isnan(tempThickness[i]) )
{
thicknessPass = false;
}
Expand Down

0 comments on commit 0dd3268

Please sign in to comment.