diff options
Diffstat (limited to 'src/SplitVector.h')
| -rw-r--r-- | src/SplitVector.h | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/src/SplitVector.h b/src/SplitVector.h index 44d5ddc0e..0ccf6c9f4 100644 --- a/src/SplitVector.h +++ b/src/SplitVector.h @@ -261,6 +261,24 @@ public:  		body[lengthBody] = 0;  		return body;  	} + +	T *RangePointer(int position, int rangeLength) { +		if (position < part1Length) { +			if ((position + rangeLength) > part1Length) { +				// Range overlaps gap, so move gap to start of range. +				GapTo(position); +				return body + position + gapLength; +			} else { +				return body + position ; +			} +		} else { +			return body + position + gapLength; +		} +	} + +	int GapPosition() const { +		return part1Length;  +	}  };  #endif | 
