The following commit has been merged in the master branch:
commit 5bf60d0e92a757431cf1cef260a8cf56531ae75e
Author: Andrei Zavada <[email protected]>
Date:   Wed Jul 10 01:22:28 2013 +0300

    think straight in CTypedSource ctor by rvalue

diff --git a/src/libsigfile/source.cc b/src/libsigfile/source.cc
index d825123..f5ffe73 100644
--- a/src/libsigfile/source.cc
+++ b/src/libsigfile/source.cc
@@ -64,10 +64,10 @@ CTypedSource (CTypedSource&& rv)
 {
        switch ( _type = rv._type ) {
        case TType::ascii:
-               _obj = new CTSVFile( move(*static_cast<CTSVFile*>(rv._obj)));
+               _obj = static_cast<CTSVFile*> (rv._obj);
                break;
        case TType::edf:
-               _obj = new CEDFFile( move(*static_cast<CEDFFile*>(rv._obj)));
+               _obj = static_cast<CEDFFile*> (rv._obj);
                break;
 
        case TType::bin:
@@ -78,7 +78,6 @@ CTypedSource (CTypedSource&& rv)
                throw invalid_argument ("Bad source type");
        }
 
-       delete rv._obj;
        rv._obj = nullptr;
 }
 

-- 
Sleep experiment manager

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to