From f39b8989642e05ba171e535d59bc67336c6d676e Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 3 Feb 2016 09:15:35 +0100 Subject: [PATCH] #2812 BBTK Bug New Normal Package std not compiling in windows fmin fmax missing in visual studio --- packages/std/src/bbstdMathOperation.cxx | 5 ++- packages/std/src/bbstdMathOperationVector.cxx | 41 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/std/src/bbstdMathOperation.cxx b/packages/std/src/bbstdMathOperation.cxx index a4b7272..68db443 100644 --- a/packages/std/src/bbstdMathOperation.cxx +++ b/packages/std/src/bbstdMathOperation.cxx @@ -11,6 +11,7 @@ namespace bbstd { + BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MathOperation) BBTK_BLACK_BOX_IMPLEMENTATION(MathOperation,bbtk::AtomicBlackBox); //===== @@ -74,8 +75,8 @@ void MathOperation::Process() if (bbGetInputType()==13) bbSetOutputOut( acos( bbGetInputIn1() ) ); if (bbGetInputType()==14) bbSetOutputOut( atan( bbGetInputIn1() ) ); if (bbGetInputType()==15) bbSetOutputOut( atan2( bbGetInputIn1(),bbGetInputIn2() ) ); - if (bbGetInputType()==16) bbSetOutputOut( fmin( bbGetInputIn1(),bbGetInputIn2() ) ); - if (bbGetInputType()==17) bbSetOutputOut( fmax( bbGetInputIn1(),bbGetInputIn2() ) ); + if (bbGetInputType()==16) bbSetOutputOut( std::min( bbGetInputIn1(),bbGetInputIn2() ) ); + if (bbGetInputType()==17) bbSetOutputOut( std::max( bbGetInputIn1(),bbGetInputIn2() ) ); if (bbGetInputType()==18) bbSetOutputOut( fabs( bbGetInputIn1() ) ); } //===== diff --git a/packages/std/src/bbstdMathOperationVector.cxx b/packages/std/src/bbstdMathOperationVector.cxx index 2fc5d4e..cebb967 100644 --- a/packages/std/src/bbstdMathOperationVector.cxx +++ b/packages/std/src/bbstdMathOperationVector.cxx @@ -5,7 +5,6 @@ #include "bbstdPackage.h" #include -#include #include namespace bbstd @@ -50,7 +49,7 @@ void MathOperationVector::MinVector(std::vector *v,std::vector * tmpResult=(*v)[0]; for (i=1;ipush_back( tmpResult ); } // if sizeVec @@ -67,7 +66,7 @@ void MathOperationVector::MaxVector(std::vector *v,std::vector * tmpResult=(*v)[0]; for (i=1;ipush_back( tmpResult ); } // if sizeVec @@ -335,15 +334,15 @@ void MathOperationVector::Process() { for (i=0;i