aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PerLine.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-04-08 14:19:22 +1000
committerNeil <nyamatongwe@gmail.com>2020-04-08 14:19:22 +1000
commit5ec92254c8c55fff77723eaef6afd437ab88d103 (patch)
tree176c6dbc8da0819d711e360ae2fbb65865a71771 /src/PerLine.h
parentb8369870e15d4b061ec5d67d0cfbfe04d3a6459f (diff)
downloadscintilla-mirror-5ec92254c8c55fff77723eaef6afd437ab88d103.tar.gz
Simplify PerLine, remove casts, use noexcept, const, & constexpr where possible.
Diffstat (limited to 'src/PerLine.h')
-rw-r--r--src/PerLine.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/PerLine.h b/src/PerLine.h
index 3da02b5e5..b6565fcc1 100644
--- a/src/PerLine.h
+++ b/src/PerLine.h
@@ -40,7 +40,7 @@ public:
bool InsertHandle(int handle, int markerNum);
void RemoveHandle(int handle);
bool RemoveNumber(int markerNum, bool all);
- void CombineWith(MarkerHandleSet *other);
+ void CombineWith(MarkerHandleSet *other) noexcept;
MarkerHandleNumber const *GetMarkerHandleNumber(int which) const noexcept;
};
@@ -61,15 +61,15 @@ public:
void InsertLine(Sci::Line line) override;
void RemoveLine(Sci::Line line) override;
- int MarkValue(Sci::Line line) noexcept;
- Sci::Line MarkerNext(Sci::Line lineStart, int mask) const;
+ int MarkValue(Sci::Line line) const noexcept;
+ Sci::Line MarkerNext(Sci::Line lineStart, int mask) const noexcept;
int AddMark(Sci::Line line, int markerNum, Sci::Line lines);
void MergeMarkers(Sci::Line line);
bool DeleteMark(Sci::Line line, int markerNum, bool all);
void DeleteMarkFromHandle(int markerHandle);
- Sci::Line LineFromHandle(int markerHandle);
- int HandleFromLine(Sci::Line line, int which) const;
- int NumberFromLine(Sci::Line line, int which) const;
+ Sci::Line LineFromHandle(int markerHandle) const noexcept;
+ int HandleFromLine(Sci::Line line, int which) const noexcept;
+ int NumberFromLine(Sci::Line line, int which) const noexcept;
};
class LineLevels : public PerLine {
@@ -90,7 +90,7 @@ public:
void ExpandLevels(Sci::Line sizeNew=-1);
void ClearLevels();
int SetLevel(Sci::Line line, int level, Sci::Line lines);
- int GetLevel(Sci::Line line) const;
+ int GetLevel(Sci::Line line) const noexcept;
};
class LineState : public PerLine {
@@ -110,7 +110,7 @@ public:
int SetLineState(Sci::Line line, int state);
int GetLineState(Sci::Line line);
- Sci::Line GetMaxLineState() const;
+ Sci::Line GetMaxLineState() const noexcept;
};
class LineAnnotation : public PerLine {
@@ -128,16 +128,16 @@ public:
void InsertLine(Sci::Line line) override;
void RemoveLine(Sci::Line line) override;
- bool MultipleStyles(Sci::Line line) const;
- int Style(Sci::Line line) const;
- const char *Text(Sci::Line line) const;
- const unsigned char *Styles(Sci::Line line) const;
+ bool MultipleStyles(Sci::Line line) const noexcept;
+ int Style(Sci::Line line) const noexcept;
+ const char *Text(Sci::Line line) const noexcept;
+ const unsigned char *Styles(Sci::Line line) const noexcept;
void SetText(Sci::Line line, const char *text);
void ClearAll();
void SetStyle(Sci::Line line, int style);
void SetStyles(Sci::Line line, const unsigned char *styles);
- int Length(Sci::Line line) const;
- int Lines(Sci::Line line) const;
+ int Length(Sci::Line line) const noexcept;
+ int Lines(Sci::Line line) const noexcept;
};
typedef std::vector<int> TabstopList;
@@ -157,9 +157,9 @@ public:
void InsertLine(Sci::Line line) override;
void RemoveLine(Sci::Line line) override;
- bool ClearTabstops(Sci::Line line);
+ bool ClearTabstops(Sci::Line line) noexcept;
bool AddTabstop(Sci::Line line, int x);
- int GetNextTabstop(Sci::Line line, int x) const;
+ int GetNextTabstop(Sci::Line line, int x) const noexcept;
};
}