Skip to content
Snippets Groups Projects
Commit ed64d68d authored by John Marshall's avatar John Marshall
Browse files

Miscellaneous portability / warning fixes

Remove extra parentheses that clang thinks are there to prevent a
different warning for "if (numConsumedByB = 0) /*assignment intended*/".
Use 0 instead of NULL to initialise non-pointers.
Only const *integral or enumeration* static data members can be portably
initialised within the class definition.
parent 5fc981c1
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,7 @@ void BedSubtract::FindAndSubtractOverlaps(BED &a, vector<BED> &hits) {
vector<bool> aKeep(a.end - a.start, true);
if ((numConsumedByB == 0)) {
if (numConsumedByB == 0) {
if(_removeAll){ return; }
// if there's any overlap, then we don't report.
......
......@@ -26,11 +26,11 @@ FastaIndexEntry::~FastaIndexEntry(void)
void FastaIndexEntry::clear(void)
{
name = "";
length = NULL;
length = 0;
offset = -1; // no real offset will ever be below 0, so this allows us to
// check if we have already recorded a real offset
line_blen = NULL;
line_len = NULL;
line_blen = 0;
line_len = 0;
useFullHeader = false;
}
......
......@@ -110,6 +110,7 @@ bool FileRecordTypeChecker::isBinaryBuffer(const char *buffer, size_t len)
//Let's say that in a text file, at least 90% of the characters
//should be alphanumeric, whitespace, or punctuation.
static const float PERCENTAGE_PRINTABLE = .9;
int alphaNumCount = 0;
int whiteSpaceCount = 0;
......
......@@ -116,8 +116,6 @@ private:
bool _eofHit;
//this will be used in determining whether we are looking at a binary or text file.
static const float PERCENTAGE_PRINTABLE = .9;
bool isBinaryBuffer(const char *buffer, size_t len);
bool isBAM(const char *buffer);
bool handleTextFormat(const char *buffer, size_t len);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment