aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-24 09:24:44 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-24 09:24:44 +1000
commit9b2941ea45ed3de51c660008f75b8d15ce18cca5 (patch)
tree16df3f0e9077887d0294c909d6fe60d72a9213a2 /src/PositionCache.h
parent083e04becbb7676dc1f699e81cff61490799e21b (diff)
downloadscintilla-mirror-9b2941ea45ed3de51c660008f75b8d15ce18cca5.tar.gz
Backport: Fix warnings. Add const, constexpr, and noexcept. Initialize. Standard methods.
Replace 0 and NULL with nullptr for COM, DirectWrite and least ambiguous cases. Backport of changeset 6974:e99161ef7bdd.
Diffstat (limited to 'src/PositionCache.h')
-rw-r--r--src/PositionCache.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h
index 7f50c4dec..bc70b7f4e 100644
--- a/src/PositionCache.h
+++ b/src/PositionCache.h
@@ -10,10 +10,14 @@
namespace Scintilla {
-static inline bool IsEOLChar(char ch) {
+inline constexpr bool IsEOLChar(int ch) noexcept {
return (ch == '\r') || (ch == '\n');
}
+inline constexpr bool IsSpaceOrTab(int ch) noexcept {
+ return ch == ' ' || ch == '\t';
+}
+
/**
* A point in document space.
* Uses double for sufficient resolution in large (>20,000,000 line) documents.
@@ -238,10 +242,6 @@ public:
const char *s, unsigned int len, XYPOSITION *positions, const Document *pdoc);
};
-inline bool IsSpaceOrTab(int ch) {
- return ch == ' ' || ch == '\t';
-}
-
}
#endif