]> git.donarmstrong.com Git - mothur.git/blobdiff - readseqsphylip.cpp
fixed memory leak in rarefact
[mothur.git] / readseqsphylip.cpp
index b6be40efb1ff744d2565d94f5cefd847e4ecb26a..fbb99c9b0d44daddf431e1fc11be168bdcc69393 100644 (file)
@@ -3,7 +3,7 @@
  *  Mothur
  *
  *  Created by Thomas Ryabin on 4/24/09.
- *  Copyright 2009 __MyCompanyName__. All rights reserved.
+ *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
  *
  */
 
@@ -31,11 +31,8 @@ bool ReadPhylip::isSeq(string seq) {
 }
 
 /*******************************************************************************/
-ReadPhylip::ReadPhylip(string file) {
+ReadPhylip::ReadPhylip(string file) : ReadSeqs(file) {
        try {
-               openInputFile(file, filehandle);
-               phylipFile = file;
-               globaldata = GlobalData::getInstance();
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the ReadTree class Function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
@@ -107,7 +104,7 @@ void ReadPhylip::read() {
                                }
                        }
                        if(!(last && count == 0))
-                               sequencedb.set(count, sequencedb.get(count).getAligned() + sequence);
+                               sequencedb.set(count, sequencedb.get(count).getUnaligned() + sequence);
                        if(letterCount == numLetters && count == 0)
                                last = true;
                }