aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.h
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-03-13 21:22:03 +0000
committernyamatongwe <unknown>2010-03-13 21:22:03 +0000
commit1b2967ee84232e3053eb6d7299f11982b91d6d81 (patch)
treea506a530b0e449bbf814f6f98c2d19c2e13dcb76 /src/PositionCache.h
parent0f626757c6c63c22943ad7e86650b9ad8787584f (diff)
downloadscintilla-mirror-1b2967ee84232e3053eb6d7299f11982b91d6d81.tar.gz
Adding const to methods where possible.
Diffstat (limited to 'src/PositionCache.h')
-rw-r--r--src/PositionCache.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h
index e99ae5870..754545877 100644
--- a/src/PositionCache.h
+++ b/src/PositionCache.h
@@ -93,7 +93,7 @@ public:
};
void Invalidate(LineLayout::validLevel validity_);
void SetLevel(int level_);
- int GetLevel() { return level; }
+ int GetLevel() const { return level; }
LineLayout *Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_,
int linesOnScreen, int linesInDoc);
void Dispose(LineLayout *ll);
@@ -111,7 +111,7 @@ public:
void Clear();
bool Retrieve(unsigned int styleNumber_, const char *s_, unsigned int len_, int *positions_) const;
static int Hash(unsigned int styleNumber, const char *s, unsigned int len);
- bool NewerThan(const PositionCacheEntry &other);
+ bool NewerThan(const PositionCacheEntry &other) const;
void ResetClock();
};
@@ -138,7 +138,7 @@ class BreakFinder {
public:
BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posLineStart_, bool utf8_, int xStart, bool breakForSelection);
~BreakFinder();
- int First();
+ int First() const;
int Next();
};
@@ -152,7 +152,7 @@ public:
~PositionCache();
void Clear();
void SetSize(size_t size_);
- int GetSize() { return size; }
+ int GetSize() const { return size; }
void MeasureWidths(Surface *surface, ViewStyle &vstyle, unsigned int styleNumber,
const char *s, unsigned int len, int *positions);
};