diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-21 11:22:39 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-21 11:22:39 +1000 |
commit | b9bf45fea55a56203f16a1eea4de7f46d8bbf964 (patch) | |
tree | 09cbc057fdb43e61ba703617e19c8b3b341670fb /src/PerLine.cxx | |
parent | 8634c0958c532e7d219e649353e1f1a74d52da1b (diff) | |
download | scintilla-mirror-b9bf45fea55a56203f16a1eea4de7f46d8bbf964.tar.gz |
Use noexcept in basic data structures where reasonable.
Declare the standard member functions in more classes
Diffstat (limited to 'src/PerLine.cxx')
-rw-r--r-- | src/PerLine.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 68677ab22..7a7fc24fa 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -33,11 +33,11 @@ MarkerHandleSet::~MarkerHandleSet() { mhList.clear(); } -bool MarkerHandleSet::Empty() const { +bool MarkerHandleSet::Empty() const noexcept { return mhList.empty(); } -int MarkerHandleSet::MarkValue() const { +int MarkerHandleSet::MarkValue() const noexcept { unsigned int m = 0; for (const MarkerHandleNumber &mhn : mhList) { m |= (1 << mhn.number); @@ -45,7 +45,7 @@ int MarkerHandleSet::MarkValue() const { return m; } -bool MarkerHandleSet::Contains(int handle) const { +bool MarkerHandleSet::Contains(int handle) const noexcept { for (const MarkerHandleNumber &mhn : mhList) { if (mhn.handle == handle) { return true; @@ -125,7 +125,7 @@ void LineMarkers::MergeMarkers(Sci::Line line) { } } -int LineMarkers::MarkValue(Sci::Line line) { +int LineMarkers::MarkValue(Sci::Line line) noexcept { if (markers.Length() && (line >= 0) && (line < markers.Length()) && markers[line]) return markers[line]->MarkValue(); else |