File: fix_auto_ptr_usage_in_gcc-7.patch

package info (click to toggle)
centrifuge 1.0.3-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,056 kB
  • sloc: cpp: 51,936; perl: 1,919; python: 1,538; makefile: 621; sh: 374
file content (52 lines) | stat: -rw-r--r-- 2,247 bytes parent folder | download | duplicates (3)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Author: Alexis Murzeau <amubtdx@gmail.com>
Last-Update: Sat, 25 Nov 2017 22:32:53 +0100
Description: Fix usage of auto_ptr
 see https://lists.debian.org/debian-mentors/2017/11/msg00193.html

--- a/bt2_idx.h
+++ b/bt2_idx.h
@@ -1050,11 +1050,11 @@ public:
 		EList<FileBuf*> is(EBWT_CAT);
 		RefReadInParams refparams(color, REF_READ_FORWARD, false, false);
 		// Adapt sequence strings to stringstreams open for input
-		auto_ptr<stringstream> ss(new stringstream());
+		unique_ptr<stringstream> ss(new stringstream());
 		for(index_t i = 0; i < strs.size(); i++) {
 			(*ss) << ">" << i << endl << strs[i] << endl;
 		}
-		auto_ptr<FileBuf> fb(new FileBuf(ss.get()));
+		unique_ptr<FileBuf> fb(new FileBuf(ss.get()));
 		assert(!fb->eof());
 		assert(fb->get() == '>');
 		ASSERT_ONLY(fb->reset());
--- a/centrifuge.cpp
+++ b/centrifuge.cpp
@@ -1491,7 +1491,7 @@ static void parseOptions(int argc, const
 	}
 	// Now parse all the presets.  Might want to pick which presets version to
 	// use according to other parameters.
-	auto_ptr<Presets> presets(new PresetsV0());
+	unique_ptr<Presets> presets(new PresetsV0());
 	// Apply default preset
 	if(!defaultPreset.empty()) {
 		polstr = applyPreset(defaultPreset, *presets.get()) + polstr;
@@ -2330,8 +2330,8 @@ static void multiseedSearchWorker(void *
 	// problems, or generally characterize performance.
 	
 	//const BitPairReference& refs   = *multiseed_refs;
-	auto_ptr<PatternSourcePerThreadFactory> patsrcFact(createPatsrcFactory(patsrc, tid));
-	auto_ptr<PatternSourcePerThread> ps(patsrcFact->create());
+	unique_ptr<PatternSourcePerThreadFactory> patsrcFact(createPatsrcFactory(patsrc, tid));
+	unique_ptr<PatternSourcePerThread> ps(patsrcFact->create());
 	
 	// Instantiate an object for holding reporting-related parameters.
     ReportingParams rp((allHits ? std::numeric_limits<THitInt>::max() : khits),
@@ -2973,7 +2973,7 @@ static void driver(
 		// memory so that we can easily sanity check them later on
 		AlnSink<index_t> *mssink = NULL;
         Timer *_tRef = new Timer(cerr, "Time loading reference: ", timing);
-        auto_ptr<BitPairReference> refs;
+        unique_ptr<BitPairReference> refs;
         delete _tRef;
         switch(outType) {
 			case OUTPUT_SAM: {