mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 04:09:10 +08:00
use const Scalar& instead of Scalar for function arguments
This commit is contained in:
parent
686689e9cf
commit
4056db01e7
@ -149,7 +149,7 @@ cube() const
|
|||||||
|
|
||||||
#define EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(METHOD_NAME,FUNCTOR) \
|
#define EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(METHOD_NAME,FUNCTOR) \
|
||||||
inline const CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >,Derived> \
|
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> \
|
return CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >,Derived> \
|
||||||
(derived(), std::bind2nd(FUNCTOR<Scalar>(), s)); \
|
(derived(), std::bind2nd(FUNCTOR<Scalar>(), s)); \
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user