From d9a4e803d7b5e9fde3009052653ec3fdf77c5c09 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 19 Apr 2017 17:44:09 +1000 Subject: Use =delete for unwanted functions. --- src/PositionCache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/PositionCache.h') diff --git a/src/PositionCache.h b/src/PositionCache.h index 56018c141..f97374cef 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -186,8 +186,6 @@ class BreakFinder { EncodingFamily encodingFamily; const SpecialRepresentations *preprs; void Insert(int val); - // Private so BreakFinder objects can not be copied - BreakFinder(const BreakFinder &); public: // If a whole run is longer than lengthStartSubdivision then subdivide // into smaller runs at spaces or punctuation. @@ -196,6 +194,8 @@ public: enum { lengthEachSubdivision = 100 }; BreakFinder(const LineLayout *ll_, const Selection *psel, Range lineRange_, Sci::Position posLineStart_, int xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw); + // Deleted so BreakFinder objects can not be copied + BreakFinder(const BreakFinder &) = delete; ~BreakFinder(); TextSegment Next(); bool More() const; @@ -205,10 +205,10 @@ class PositionCache { std::vector pces; unsigned int clock; bool allClear; - // Private so PositionCache objects can not be copied - PositionCache(const PositionCache &); public: PositionCache(); + // Deleted so PositionCache objects can not be copied + PositionCache(const PositionCache &) = delete; ~PositionCache(); void Clear(); void SetSize(size_t size_); -- cgit v1.2.3