[med-svn] [SCM] aghermann branch, master, updated. c0bd21ca8eb529ade7e0c7aad22951a308a8dc8f

Andrei Zavada johnhommer at gmail.com
Wed May 1 00:09:37 UTC 2013


The following commit has been merged in the master branch:
commit bec8388dca42ddc20c8c0580349f2560026c11a0
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Fri Apr 26 01:48:59 2013 +0300

    compare not pointers but what they point to, to uniquify common_annotations

diff --git a/src/ui/sf/sf.cc b/src/ui/sf/sf.cc
index b669686..8cfbb63 100644
--- a/src/ui/sf/sf.cc
+++ b/src/ui/sf/sf.cc
@@ -141,12 +141,14 @@ SScoringFacility (agh::CSubject& J,
       // collect common annotations
 	for ( auto& H : channels )
 		for ( auto& A : H.crecording.F().annotations() )
-			common_annotations.push_back( {&H.crecording.F(), &A}); // bitch&
+			if ( not any_of( common_annotations.begin(), common_annotations.end(),
+					 [&A]( const pair<const sigfile::CSource*, const sigfile::SAnnotation*>& a1)
+					 { return *a1.second == A; }) )
+				common_annotations.push_back( {&H.crecording.F(), &A}); // bitch&
 	common_annotations.sort(
 	      []( const pair<const sigfile::CSource*, const sigfile::SAnnotation*>& a1,
 		  const pair<const sigfile::CSource*, const sigfile::SAnnotation*>& a2)
 	      { return *a1.second < *a2.second; });
-	common_annotations.unique();
 	printf( "collected %zu embedded annotations\n", common_annotations.size());
 
       // count n_eeg_channels

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list