diff options
| author | nyamatongwe <unknown> | 2012-05-26 15:15:07 +1000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2012-05-26 15:15:07 +1000 | 
| commit | 00c771cecda620db28cec9e4c50830f542e3a829 (patch) | |
| tree | b14ac398aa30f650cf9c38fd43407d13e32384e8 /src/SplitVector.h | |
| parent | 0af9eecdbfe8e8260ef67316e7208e1385715c73 (diff) | |
| download | scintilla-mirror-00c771cecda620db28cec9e4c50830f542e3a829.tar.gz | |
Add GetRangePointer and GetGapPosition methods.
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 | 
