From cdaffe0f2b6f6d1804f5505995bffb6f812f957b Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Mon, 28 Jul 2014 11:01:25 +0200 Subject: [PATCH] Fix a mixup with template parameters. --- src/vector.hpp | 8 ++++---- src/vector.inl | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vector.hpp b/src/vector.hpp index 190b7a6..97ae5f4 100644 --- a/src/vector.hpp +++ b/src/vector.hpp @@ -81,13 +81,13 @@ namespace cloonel { template Vector::type, S> operator/ ( Vector parA, const Vector& parB ) __attribute__((pure)); template ::value>::type> - Vector::type, S> operator+ ( U parA, const Vector& parB ) __attribute__((pure)); + Vector::type, S> operator+ ( U parA, const Vector& parB ) __attribute__((pure)); template ::value>::type> - Vector::type, S> operator- ( U parA, const Vector& parB ) __attribute__((pure)); + Vector::type, S> operator- ( U parA, const Vector& parB ) __attribute__((pure)); template ::value>::type> - Vector::type, S> operator* ( U parA, const Vector& parB ) __attribute__((pure)); + Vector::type, S> operator* ( U parA, const Vector& parB ) __attribute__((pure)); template ::value>::type> - Vector::type, S> operator/ ( U parA, const Vector& parB ) __attribute__((pure)); + Vector::type, S> operator/ ( U parA, const Vector& parB ) __attribute__((pure)); template ::value>::type> Vector::type, S> operator+ ( const Vector& parA, U parB ) __attribute__((pure)); template ::value>::type> diff --git a/src/vector.inl b/src/vector.inl index b435379..14d8680 100644 --- a/src/vector.inl +++ b/src/vector.inl @@ -139,19 +139,19 @@ namespace cloonel { ///------------------------------------------------------------------------- ///------------------------------------------------------------------------- template - Vector::type, S> operator+ (T parA, const Vector& parB) { + Vector::type, S> operator+ (U parA, const Vector& parB) { return parB + parA; } template - Vector::type, S> operator- (T parA, const Vector& parB) { + Vector::type, S> operator- (U parA, const Vector& parB) { return Vector(parA) - parB; } template - Vector::type, S> operator* (T parA, const Vector& parB) { + Vector::type, S> operator* (U parA, const Vector& parB) { return parB * parA; } template - Vector::type, S> operator/ (T parA, const Vector& parB) { + Vector::type, S> operator/ (U parA, const Vector& parB) { return Vector(parA) / parB; } template