toon-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Toon-members] TooN mbase.hh vbase.hh


From: Gerhard Reitmayr
Subject: [Toon-members] TooN mbase.hh vbase.hh
Date: Thu, 27 Sep 2007 13:32:30 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Gerhard Reitmayr <gerhard>      07/09/27 13:32:30

Modified files:
        .              : mbase.hh vbase.hh 

Log message:
        added casts to self again, to allow code like m[0] *= 2 to work again. 
Such code requires an l-value reference to the temporary row vector to be 
passed to the *= operator

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/mbase.hh?cvsroot=toon&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/TooN/vbase.hh?cvsroot=toon&r1=1.15&r2=1.16

Patches:
Index: mbase.hh
===================================================================
RCS file: /cvsroot/toon/TooN/mbase.hh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- mbase.hh    4 Sep 2007 23:16:46 -0000       1.10
+++ mbase.hh    27 Sep 2007 13:32:29 -0000      1.11
@@ -131,6 +131,8 @@
     return *this;
   }
 
+    operator DynamicMatrix& () { return *this; }
+    operator const DynamicMatrix& () const { return *this; }
 
 };
 

Index: vbase.hh
===================================================================
RCS file: /cvsroot/toon/TooN/vbase.hh,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- vbase.hh    4 Sep 2007 23:15:55 -0000       1.15
+++ vbase.hh    27 Sep 2007 13:32:29 -0000      1.16
@@ -129,6 +129,8 @@
     VectorCopy<Accessor,Accessor>::eval(*this,from);
     return *this;
   }
+    operator DynamicVector& () { return *this; }
+    operator const DynamicVector& () const { return *this; }
 
   template<class A, int I> DynamicVector<Accessor> & operator=(const 
VectorMagic::VectorCreator<A,I>& v)
   {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]