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
@@ -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());
@@ -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: {
|