summaryrefslogtreecommitdiffstats
path: root/scintilla/src/PositionCache.h
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2013-05-08 13:48:02 +0300
committerXhmikosR <xhmikosr@users.sourceforge.net>2013-05-15 13:40:36 +0300
commit5a3e2bf9cbbcf6f4c33c0317a054ffffb3699b63 (patch)
tree244122d6c214d4f42e83000cb6b553b93634768c /scintilla/src/PositionCache.h
parent4ec8a84b0b81489c687079215ffdedfc67ad1928 (diff)
downloadnotepad2-mod-5a3e2bf9cbbcf6f4c33c0317a054ffffb3699b63.zip
notepad2-mod-5a3e2bf9cbbcf6f4c33c0317a054ffffb3699b63.tar.gz
notepad2-mod-5a3e2bf9cbbcf6f4c33c0317a054ffffb3699b63.tar.bz2
Update Scintilla to 1d988d
Diffstat (limited to 'scintilla/src/PositionCache.h')
-rw-r--r--scintilla/src/PositionCache.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/scintilla/src/PositionCache.h b/scintilla/src/PositionCache.h
index 1b909fd..50913f4 100644
--- a/scintilla/src/PositionCache.h
+++ b/scintilla/src/PositionCache.h
@@ -73,13 +73,11 @@ public:
*/
class LineLayoutCache {
int level;
- int length;
- int size;
- LineLayout **cache;
+ std::vector<LineLayout *>cache;
bool allInvalidated;
int styleClock;
int useCount;
- void Allocate(int length_);
+ void Allocate(size_t length_);
void AllocateForLevel(int linesOnScreen, int linesInDoc);
public:
LineLayoutCache();
@@ -122,9 +120,7 @@ class BreakFinder {
int lineEnd;
int posLineStart;
int nextBreak;
- int *selAndEdge;
- unsigned int saeSize;
- unsigned int saeLen;
+ std::vector<int> selAndEdge;
unsigned int saeCurrentPos;
int saeNext;
int subBreak;
@@ -146,8 +142,7 @@ public:
};
class PositionCache {
- PositionCacheEntry *pces;
- size_t size;
+ std::vector<PositionCacheEntry> pces;
unsigned int clock;
bool allClear;
// Private so PositionCache objects can not be copied
@@ -157,7 +152,7 @@ public:
~PositionCache();
void Clear();
void SetSize(size_t size_);
- size_t GetSize() const { return size; }
+ size_t GetSize() const { return pces.size(); }
void MeasureWidths(Surface *surface, ViewStyle &vstyle, unsigned int styleNumber,
const char *s, unsigned int len, XYPOSITION *positions, Document *pdoc);
};