Skip to content

Commit

Permalink
Move sqReadDataWriter() default initializers to class definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwalenz committed Sep 5, 2020
1 parent ac1cddd commit 1241bb7
Showing 1 changed file with 17 additions and 29 deletions.
46 changes: 17 additions & 29 deletions src/stores/sqRead.H
Original file line number Diff line number Diff line change
Expand Up @@ -537,18 +537,6 @@ public:
_rawC = rawc;
_corU = coru;
_corC = corc;

_nameAlloc = 0;
_nameLen = 0;
_name = NULL;

_rawBasesAlloc = 0;
_rawBasesLen = 0;
_rawBases = NULL;

_corBasesAlloc = 0;
_corBasesLen = 0;
_corBases = NULL;
};

~sqReadDataWriter() {
Expand Down Expand Up @@ -588,23 +576,23 @@ public:
void sqReadDataWriter_writeBlob(writeBuffer *buffer);

private:
sqReadMeta *_meta; // Pointer to the read metadata.
sqReadSeq *_rawU;
sqReadSeq *_rawC;
sqReadSeq *_corU;
sqReadSeq *_corC;

uint32 _nameAlloc;
uint32 _nameLen;
char *_name;

uint32 _rawBasesAlloc; // The raw sequence.
uint32 _rawBasesLen; // Length of string, INCLUDING terminating NUL byte.
char *_rawBases;

uint32 _corBasesAlloc; // The corrected sequence.
uint32 _corBasesLen; // Length of string, INCLUDING terminating NUL byte.
char *_corBases;
sqReadMeta *_meta = nullptr; // Pointer to the read metadata.
sqReadSeq *_rawU = nullptr; // In sqStoreCreate, these pointers are
sqReadSeq *_rawC = nullptr; // back to the data in sqStore itself.
sqReadSeq *_corU = nullptr;
sqReadSeq *_corC = nullptr;

uint32 _nameAlloc = 0;
uint32 _nameLen = 0;
char *_name = nullptr;

uint32 _rawBasesAlloc = 0; // The raw sequence. The length is the
uint32 _rawBasesLen = 0; // length of the array, not of the string.
char *_rawBases = nullptr;

uint32 _corBasesAlloc = 0; // The corrected sequence. The length is the
uint32 _corBasesLen = 0; // length of the array, not of the string.
char *_corBases = nullptr;

friend class sqStore;
friend class sqStoreBlobWriter;
Expand Down

0 comments on commit 1241bb7

Please sign in to comment.