File: 01_fix_ctors.patch

package info (click to toggle)
libmems 1.6.0%2B4725-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,164 kB
  • sloc: cpp: 21,579; ansic: 4,313; xml: 115; makefile: 107; sh: 26
file content (26 lines) | stat: -rw-r--r-- 875 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Author: Andrei Zavada <johnhommer@gmail.com>
Last-Update: 2015-04-18
Description: fix ctors of {MatchLeftEnd,LabeledMem}Comparator to enable sort/3 with g++-4.9

--- a/libMems/Aligner.cpp
+++ b/libMems/Aligner.cpp
@@ -939,7 +939,7 @@ public:
 	MatchLeftEndComparator( unsigned seq = 0 ){
 		m_seq = seq;
 	}
-	MatchLeftEndComparator( MatchLeftEndComparator& msc ){
+	MatchLeftEndComparator( const MatchLeftEndComparator& msc ){
 		m_seq = msc.m_seq;
 	}
 	// TODO??  make this do a wraparound comparison if all is equal?
--- a/libMems/Aligner.h
+++ b/libMems/Aligner.h
@@ -49,7 +49,7 @@ public:
 	LabeledMemComparator( uint seq ){
 		m_seq = seq;
 	}
-	LabeledMemComparator( LabeledMemComparator& lmc ){
+	LabeledMemComparator( const LabeledMemComparator& lmc ){
 		m_seq = lmc.m_seq;
 	}
 	boolean operator()(const LabeledMem& a, const LabeledMem& b) const{