comparison dwtx/jface/text/GapTextStore.d @ 134:51e6e63f930e

Regex fix for casts
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 01:46:20 +0200
parents 7d818bd32d63
children 75302ef3f92f
comparison
equal deleted inserted replaced
133:7d818bd32d63 134:51e6e63f930e
417 */ 417 */
418 private int reallocate(int offset, int remove, final int oldGapSize, int newGapSize, final int newGapStart) { 418 private int reallocate(int offset, int remove, final int oldGapSize, int newGapSize, final int newGapStart) {
419 // the new content length (without any gap) 419 // the new content length (without any gap)
420 final int newLength= fContent.length - newGapSize; 420 final int newLength= fContent.length - newGapSize;
421 // the new array size based on the gap factor 421 // the new array size based on the gap factor
422 int newArraySize= (int) (newLength * fSizeMultiplier); 422 int newArraySize= cast(int) (newLength * fSizeMultiplier);
423 newGapSize= newArraySize - newLength; 423 newGapSize= newArraySize - newLength;
424 424
425 // bound the gap size within min/max 425 // bound the gap size within min/max
426 if (newGapSize < fMinGapSize) { 426 if (newGapSize < fMinGapSize) {
427 newGapSize= fMinGapSize; 427 newGapSize= fMinGapSize;