diff options
Diffstat (limited to 'src/PositionCache.h')
| -rw-r--r-- | src/PositionCache.h | 15 | 
1 files changed, 10 insertions, 5 deletions
| diff --git a/src/PositionCache.h b/src/PositionCache.h index 512ec13f5..5657b667c 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. @@ -122,6 +126,11 @@ struct ScreenLine : public IScreenLine {  	int tabWidthMinimumPixels;  	ScreenLine(const LineLayout *ll_, int subLine, const ViewStyle &vs, XYPOSITION width_, int tabWidthMinimumPixels_); +	// Deleted so ScreenLine objects can not be copied. +	ScreenLine(const ScreenLine &) = delete; +	ScreenLine(ScreenLine &&) = delete; +	void operator=(const ScreenLine &) = delete; +	void operator=(ScreenLine &&) = delete;  	virtual ~ScreenLine();  	std::string_view Text() const override; @@ -274,10 +283,6 @@ public:  		const char *s, unsigned int len, XYPOSITION *positions, const Document *pdoc);  }; -inline bool IsSpaceOrTab(int ch) { -	return ch == ' ' || ch == '\t'; -} -  }  #endif | 
