]> git.donarmstrong.com Git - mothur.git/blobdiff - inputdata.cpp
fixing minor bugs
[mothur.git] / inputdata.cpp
index 2c249e6a4a42b89a93b48a4252c60613f40fae9f..b237bb4fc55b0bacafa3815f9619f0345bd31492 100644 (file)
@@ -24,7 +24,7 @@ InputData::InputData(string fName, string f) : format(f){
 
 
 InputData::~InputData(){
-       
+       fileHandle.close();
 //     delete output;
        
 }
@@ -183,14 +183,14 @@ OrderVector* InputData::getOrderVector(){
        }       
 }
 /***********************************************************************/
-
+//this is used when you don't need the order vector
 vector<SharedRAbundVector*> InputData::getSharedRAbundVectors(){
        try {
                if(fileHandle){
                        if (format == "sharedfile")  {
-                               SharedOrder = new SharedOrderVector(fileHandle);
-                               if (SharedOrder != NULL) {
-                                       return SharedOrder->getSharedRAbundVector();
+                               SharedRAbundVector* SharedRAbund = new SharedRAbundVector(fileHandle);
+                               if (SharedRAbund != NULL) {
+                                       return SharedRAbund->getSharedRAbundVectors();
                                }
                        }else if (format == "shared") {
                                SharedList = new SharedListVector(fileHandle);
@@ -216,6 +216,7 @@ vector<SharedRAbundVector*> InputData::getSharedRAbundVectors(){
        }       
 }
 
+
 /***********************************************************************/
 
 SAbundVector* InputData::getSAbundVector(){