Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang 17 #232

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/api/BamAlignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
11 changes: 4 additions & 7 deletions src/api/algorithms/Sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ struct API_EXPORT Sort
return false; // <-- unreachable
}

//! Base class for our sorting function objects
typedef std::binary_function<BamAlignment, BamAlignment, bool> AlignmentSortBase;

/*! \struct BamTools::Algorithms::Sort::ByName
\brief Function object for comparing alignments by name

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -177,7 +174,7 @@ struct API_EXPORT Sort
\endcode
*/
template <typename T>
struct ByTag : public AlignmentSortBase
struct ByTag
{

// ctor
Expand Down Expand Up @@ -227,7 +224,7 @@ struct API_EXPORT Sort
std::set<BamAlignment, Sort::Unsorted>; // STL set, unsorted (but probably insertion order)
\endcode
*/
struct Unsorted : public AlignmentSortBase
struct Unsorted
{

// comparison function
Expand Down
2 changes: 1 addition & 1 deletion src/api/internal/bam/BamMultiMerger_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct API_NO_EXPORT MergeItem
};

template <typename Compare>
struct API_NO_EXPORT MergeItemSorter : public std::binary_function<MergeItem, MergeItem, bool>
struct API_NO_EXPORT MergeItemSorter
{

public:
Expand Down
4 changes: 0 additions & 4 deletions src/utils/bamtools_fasta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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
Expand Down
Loading