diff --git a/src/api/BamAlignment.cpp b/src/api/BamAlignment.cpp index ce8ed3a..46f2bc7 100644 --- a/src/api/BamAlignment.cpp +++ b/src/api/BamAlignment.cpp @@ -870,7 +870,6 @@ void BamAlignment::RemoveTag(const std::string& tag) char* pOriginalTagData = (char*)TagData.data(); char* pTagData = pOriginalTagData; const unsigned int originalTagDataLength = TagData.size(); - unsigned int newTagDataLength = 0; unsigned int numBytesParsed = 0; // skip if tag not found @@ -885,7 +884,6 @@ void BamAlignment::RemoveTag(const std::string& tag) pTagData -= 3; numBytesParsed -= 3; const unsigned int beginningTagDataLength = numBytesParsed; - newTagDataLength += beginningTagDataLength; std::memcpy(newTagData.Buffer, pOriginalTagData, numBytesParsed); // attemp to skip to next tag diff --git a/src/api/algorithms/Sort.h b/src/api/algorithms/Sort.h index eddf4f5..037cebc 100644 --- a/src/api/algorithms/Sort.h +++ b/src/api/algorithms/Sort.h @@ -60,9 +60,6 @@ struct API_EXPORT Sort return false; // <-- unreachable } - //! Base class for our sorting function objects - typedef std::binary_function AlignmentSortBase; - /*! \struct BamTools::Algorithms::Sort::ByName \brief Function object for comparing alignments by name @@ -79,7 +76,7 @@ struct API_EXPORT Sort std::sort( a.begin(), a.end(), Sort::ByName(Sort::DescendingOrder) ); \endcode */ - struct ByName : public AlignmentSortBase + struct ByName { // ctor @@ -120,7 +117,7 @@ struct API_EXPORT Sort std::sort( a.begin(), a.end(), Sort::ByPosition(Sort::DescendingOrder) ); \endcode */ - struct ByPosition : public AlignmentSortBase + struct ByPosition { // ctor @@ -177,7 +174,7 @@ struct API_EXPORT Sort \endcode */ template - struct ByTag : public AlignmentSortBase + struct ByTag { // ctor @@ -227,7 +224,7 @@ struct API_EXPORT Sort std::set; // STL set, unsorted (but probably insertion order) \endcode */ - struct Unsorted : public AlignmentSortBase + struct Unsorted { // comparison function diff --git a/src/api/internal/bam/BamMultiMerger_p.h b/src/api/internal/bam/BamMultiMerger_p.h index d7b6249..8670ac5 100644 --- a/src/api/internal/bam/BamMultiMerger_p.h +++ b/src/api/internal/bam/BamMultiMerger_p.h @@ -49,7 +49,7 @@ struct API_NO_EXPORT MergeItem }; template -struct API_NO_EXPORT MergeItemSorter : public std::binary_function +struct API_NO_EXPORT MergeItemSorter { public: diff --git a/src/utils/bamtools_fasta.cpp b/src/utils/bamtools_fasta.cpp index 1138671..209f61f 100644 --- a/src/utils/bamtools_fasta.cpp +++ b/src/utils/bamtools_fasta.cpp @@ -175,7 +175,6 @@ bool Fasta::FastaPrivate::CreateIndex(const std::string& indexFilename) } // iterate through fasta entries - int currentId = 0; std::string header; std::string sequence; while (GetNextHeader(header)) { @@ -207,9 +206,6 @@ bool Fasta::FastaPrivate::CreateIndex(const std::string& indexFilename) // store index entry Index.push_back(data); - - // update ref Id - ++currentId; } // open index file