Browse Source

simplified code in SequenceResult.opIndex

remotes/georgeg/no_streams
lomereiter 9 years ago
parent
commit
c4eaadd3d3
  1. 14
      bio/bam/read.d

14
bio/bam/read.d

@ -381,18 +381,10 @@ struct BamRead {
@property Base opIndex(size_t i) const {
auto pos = _index + i;
ubyte raw = _data[mixin(_getActualPosition("pos"))];
if (_use_first_4_bits) {
if (pos & 1) {
raw &= 0xF;
} else {
raw >>= 4;
}
if (_use_first_4_bits == (pos % 2 == 1)) {
raw &= 0xF;
} else {
if (pos & 1) {
raw >>= 4;
} else {
raw &= 0xF;
}
raw >>= 4;
}
return Base.fromInternalCode(raw);
}

Loading…
Cancel
Save