aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-04-21 09:30:16 +1000
committerNeil <nyamatongwe@gmail.com>2017-04-21 09:30:16 +1000
commit261277783fa16e0c974b1981a5eb0a208fca955e (patch)
treef9a75c9fd718ef57994b775e6d653983e5634085 /src/PositionCache.h
parentcd65e0b6478f38b809dd08805e7795a9d8b669eb (diff)
downloadscintilla-mirror-261277783fa16e0c974b1981a5eb0a208fca955e.tar.gz
More consistent deletion of standard methods.
Diffstat (limited to 'src/PositionCache.h')
-rw-r--r--src/PositionCache.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h
index f97374cef..e7008a456 100644
--- a/src/PositionCache.h
+++ b/src/PositionCache.h
@@ -77,6 +77,9 @@ public:
XYPOSITION wrapIndent; // In pixels
explicit LineLayout(int maxLineLength_);
+ // Deleted so LineLayout objects can not be copied.
+ LineLayout(const LineLayout &) = delete;
+ void operator=(const LineLayout &) = delete;
virtual ~LineLayout();
void Resize(int maxLineLength_);
void Free();
@@ -107,6 +110,9 @@ class LineLayoutCache {
void AllocateForLevel(Sci::Line linesOnScreen, Sci::Line linesInDoc);
public:
LineLayoutCache();
+ // Deleted so LineLayoutCache objects can not be copied.
+ LineLayoutCache(const LineLayoutCache &) = delete;
+ void operator=(const LineLayoutCache &) = delete;
virtual ~LineLayoutCache();
void Deallocate();
enum {
@@ -130,6 +136,10 @@ class PositionCacheEntry {
XYPOSITION *positions;
public:
PositionCacheEntry();
+ // Copy constructor not currently used, but needed for being element in std::vector.
+ PositionCacheEntry(const PositionCacheEntry &);
+ // Deleted so PositionCacheEntry objects can not be assigned.
+ void operator=(const PositionCacheEntry &) = delete;
~PositionCacheEntry();
void Set(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_, unsigned int clock_);
void Clear();
@@ -194,8 +204,9 @@ 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
+ // Deleted so BreakFinder objects can not be copied.
BreakFinder(const BreakFinder &) = delete;
+ void operator=(const BreakFinder &) = delete;
~BreakFinder();
TextSegment Next();
bool More() const;
@@ -207,8 +218,9 @@ class PositionCache {
bool allClear;
public:
PositionCache();
- // Deleted so PositionCache objects can not be copied
+ // Deleted so PositionCache objects can not be copied.
PositionCache(const PositionCache &) = delete;
+ void operator=(const PositionCache &) = delete;
~PositionCache();
void Clear();
void SetSize(size_t size_);