aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-06-11 10:08:29 +1000
committerNeil <nyamatongwe@gmail.com>2020-06-11 10:08:29 +1000
commita2931677c6e28aad5ddd56d82e5a8814746dc5fd (patch)
treed8c143a1ebcb4e91717d241c38ec43bf1da9e6ac /src/PositionCache.h
parentb34e1a6efefd7b39f14daa867510b2e2d453a0bb (diff)
downloadscintilla-mirror-a2931677c6e28aad5ddd56d82e5a8814746dc5fd.tar.gz
Use noexcept where safe and maintainable.
Diffstat (limited to 'src/PositionCache.h')
-rw-r--r--src/PositionCache.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h
index faae023f8..e5a668875 100644
--- a/src/PositionCache.h
+++ b/src/PositionCache.h
@@ -97,22 +97,22 @@ public:
void Resize(int maxLineLength_);
void EnsureBidiData();
void Free() noexcept;
- void Invalidate(validLevel validity_);
- int LineStart(int line) const;
- int LineLength(int line) const;
+ void Invalidate(validLevel validity_) noexcept;
+ int LineStart(int line) const noexcept;
+ int LineLength(int line) const noexcept;
enum class Scope { visibleOnly, includeEnd };
- int LineLastVisible(int line, Scope scope) const;
- Range SubLineRange(int subLine, Scope scope) const;
- bool InLine(int offset, int line) const;
- int SubLineFromPosition(int posInLine, PointEnd pe) const;
+ int LineLastVisible(int line, Scope scope) const noexcept;
+ Range SubLineRange(int subLine, Scope scope) const noexcept;
+ bool InLine(int offset, int line) const noexcept;
+ int SubLineFromPosition(int posInLine, PointEnd pe) const noexcept;
void SetLineStart(int line, int start);
void SetBracesHighlight(Range rangeLine, const Sci::Position braces[],
char bracesMatchStyle, int xHighlight, bool ignoreStyle);
void RestoreBracesHighlight(Range rangeLine, const Sci::Position braces[], bool ignoreStyle);
- int FindBefore(XYPOSITION x, Range range) const;
- int FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const;
- Point PointFromPosition(int posInLine, int lineHeight, PointEnd pe) const;
- int EndLineStyle() const;
+ int FindBefore(XYPOSITION x, Range range) const noexcept;
+ int FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const noexcept;
+ Point PointFromPosition(int posInLine, int lineHeight, PointEnd pe) const noexcept;
+ int EndLineStyle() const noexcept;
};
struct ScreenLine : public IScreenLine {
@@ -170,7 +170,7 @@ public:
llcPage=SC_CACHE_PAGE,
llcDocument=SC_CACHE_DOCUMENT
};
- void Invalidate(LineLayout::validLevel validity_);
+ void Invalidate(LineLayout::validLevel validity_) noexcept;
void SetLevel(int level_) noexcept;
int GetLevel() const noexcept { return level; }
LineLayout *Retrieve(Sci::Line lineNumber, Sci::Line lineCaret, int maxChars, int styleClock_,
@@ -194,7 +194,7 @@ public:
~PositionCacheEntry();
void Set(unsigned int styleNumber_, const char *s_, unsigned int len_, const XYPOSITION *positions_, unsigned int clock_);
void Clear() noexcept;
- bool Retrieve(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_) const;
+ bool Retrieve(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_) const noexcept;
static unsigned int Hash(unsigned int styleNumber_, const char *s, unsigned int len_) noexcept;
bool NewerThan(const PositionCacheEntry &other) const noexcept;
void ResetClock() noexcept;