Fixed bug in BBPCostFunction::operator=() which prevented desired assignment from...
authorJoris Mooij <joris.mooij@tuebingen.mpg.de>
Mon, 1 Mar 2010 11:55:39 +0000 (12:55 +0100)
committerJoris Mooij <joris.mooij@tuebingen.mpg.de>
Mon, 1 Mar 2010 11:55:39 +0000 (12:55 +0100)
ChangeLog
include/dai/bbp.h

index 6a35501..3db424c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 git HEAD
 --------
 
+* Fixed bug in BBPCostFunction::operator=() which prevented the desired 
+  assignment from happening
 * [Stefano Pellegrini] Fixed bug in BP[logdomain=1,inference=MAXPROD]
 * Removed deprecated functionality
 * Updated ChangeLog for libDAI-0.2.4 (forgot a few entries)
index 2b78e46..ed61a9c 100644 (file)
@@ -54,9 +54,7 @@ class BBPCostFunction : public BBPCostFunctionBase {
 
         /// Assignment operator
         BBPCostFunction& operator=( const BBPCostFunctionBase &x ) {
-            if( this != &x ) {
-                (BBPCostFunctionBase)*this = x;
-            }
+            BBPCostFunctionBase::operator=( x );
             return *this;
         }
 };