From cd65e0b6478f38b809dd08805e7795a9d8b669eb Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 20 Apr 2017 16:10:17 +1000 Subject: More consistent deletion of standard methods. --- lexlib/StyleContext.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lexlib') diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index 045939f14..7b2f59c00 100644 --- a/lexlib/StyleContext.h +++ b/lexlib/StyleContext.h @@ -27,8 +27,6 @@ class StyleContext { Sci_PositionU currentPosLastRelative; Sci_Position offsetRelative; - StyleContext &operator=(const StyleContext &); - void GetNextChar() { if (multiByteAccess) { chNext = multiByteAccess->GetCharacterAndWidth(currentPos+width, &widthNext); @@ -97,6 +95,9 @@ public: GetNextChar(); } + // Deleted so StyleContext objects can not be copied + StyleContext(const StyleContext &) = delete; + StyleContext &operator=(const StyleContext &) = delete; void Complete() { styler.ColourTo(currentPos - ((currentPos > lengthDocument) ? 2 : 1), state); styler.Flush(); -- cgit v1.2.3