From: derek Date: Wed, 4 Apr 2012 17:17:21 +0000 (-0400) Subject: Fixed: invalidated by-name sort order in some cases X-Git-Url: https://git.donarmstrong.com/?p=bamtools.git;a=commitdiff_plain;h=d9a14ac04a9da82f7d511f0fba9ae0bf4797614d;hp=76bb08a359f3974eee3e96327b965ccf7958ed1a Fixed: invalidated by-name sort order in some cases * due to (unintentional) member variable stored as reference --- diff --git a/src/api/algorithms/Sort.h b/src/api/algorithms/Sort.h index 92cb165..32902e1 100644 --- a/src/api/algorithms/Sort.h +++ b/src/api/algorithms/Sort.h @@ -3,7 +3,7 @@ // Marth Lab, Department of Biology, Boston College // All rights reserved. // --------------------------------------------------------------------------- -// Last modified: 10 October 2011 (DB) +// Last modified: 4 April 2012 (DB) // --------------------------------------------------------------------------- // Provides sorting functionality. // *************************************************************************** @@ -85,7 +85,7 @@ struct API_EXPORT Sort { // data members private: - const Sort::Order& m_order; + const Sort::Order m_order; }; /*! \struct BamTools::Algorithms::Sort::ByPosition @@ -131,7 +131,7 @@ struct API_EXPORT Sort { // data members private: - Sort::Order m_order; + const Sort::Order m_order; }; /*! \struct BamTools::Algorithms::Sort::ByTag @@ -178,8 +178,8 @@ struct API_EXPORT Sort { // data members private: - std::string m_tag; - Sort::Order m_order; + const std::string m_tag; + const Sort::Order m_order; }; /*! \struct BamTools::Algorithms::Sort::Unsorted