[med-svn] [centrifuge] 01/01: Fix auto_ptr usage

Andreas Tille tille at debian.org
Sun Nov 26 14:06:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository centrifuge.

commit 04201768decebdd00c8038097b9c81c62fa13b47
Author: Andreas Tille <tille at debian.org>
Date:   Sat Nov 25 23:02:55 2017 +0100

    Fix auto_ptr usage
---
 debian/patches/fix_auto_ptr_usage_in_gcc-7.patch | 52 ++++++++++++++++++++++++
 debian/patches/series                            |  1 +
 2 files changed, 53 insertions(+)

diff --git a/debian/patches/fix_auto_ptr_usage_in_gcc-7.patch b/debian/patches/fix_auto_ptr_usage_in_gcc-7.patch
new file mode 100644
index 0000000..133ede2
--- /dev/null
+++ b/debian/patches/fix_auto_ptr_usage_in_gcc-7.patch
@@ -0,0 +1,52 @@
+Author: Alexis Murzeau <amubtdx at 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: {
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a0e148b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_auto_ptr_usage_in_gcc-7.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/centrifuge.git



More information about the debian-med-commit mailing list