aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-03-03 16:22:41 +1100
committerNeil <nyamatongwe@gmail.com>2019-03-03 16:22:41 +1100
commit5c09372e24c4656dc0e40bba890eef539d0b8ad2 (patch)
treeeb1ffb85392e4f23ef14197d93f87acfbfc9e6c2 /src/Document.cxx
parent93d87606364468124d9f4072375c82d03c3e5130 (diff)
downloadscintilla-mirror-5c09372e24c4656dc0e40bba890eef539d0b8ad2.tar.gz
Use constexpr where reasonable and move groups of static functions into unnamed
namespace.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 0f71ba843..f9cd654c7 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -1089,7 +1089,7 @@ int Document::DBCSDrawBytes(std::string_view text) const noexcept {
}
}
-static inline bool IsSpaceOrTab(int ch) noexcept {
+static constexpr bool IsSpaceOrTab(int ch) noexcept {
return ch == ' ' || ch == '\t';
}
@@ -1435,7 +1435,7 @@ void Document::DelCharBack(Sci::Position pos) {
}
}
-static Sci::Position NextTab(Sci::Position pos, Sci::Position tabSize) noexcept {
+static constexpr Sci::Position NextTab(Sci::Position pos, Sci::Position tabSize) noexcept {
return ((pos / tabSize) + 1) * tabSize;
}
@@ -2551,7 +2551,7 @@ Sci::Position Document::WordPartRight(Sci::Position pos) const {
return pos;
}
-static bool IsLineEndChar(char c) noexcept {
+static constexpr bool IsLineEndChar(char c) noexcept {
return (c == '\n' || c == '\r');
}