fix compile error on vector scalar multiplication when scalar type differs of vector scalar type and the scalar was lhs

closes #2367

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1291 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Matthias Möller
2015-06-18 11:53:05 +00:00
parent 508305c555
commit e9431e6557

View File

@@ -250,9 +250,9 @@ VectorT<double,3>::operator%(const VectorT<double,3>& _rhs) const
/// \relates OpenMesh::VectorT
/// scalar * vector
template<typename Scalar,int N>
inline VectorT<Scalar,N> operator*(Scalar _s, const VectorT<Scalar,N>& _v) {
return VectorT<Scalar,N>(_v) *= _s;
template<typename Scalar1, typename Scalar2,int N>
inline VectorT<Scalar1,N> operator*(Scalar2 _s, const VectorT<Scalar1,N> _v) {
return _v*_s;
}