use const Scalar& instead of Scalar for function arguments

This commit is contained in:
Gael Guennebaud 2010-06-25 13:52:23 +02:00
parent 686689e9cf
commit 4056db01e7

View File

@ -149,7 +149,7 @@ cube() const
#define EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(METHOD_NAME,FUNCTOR) \
inline const CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >,Derived> \
METHOD_NAME(Scalar s) const { \
METHOD_NAME(const Scalar& s) const { \
return CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >,Derived> \
(derived(), std::bind2nd(FUNCTOR<Scalar>(), s)); \
}