diff options
author | Neil <nyamatongwe@gmail.com> | 2017-04-19 17:44:09 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-04-19 17:44:09 +1000 |
commit | d9a4e803d7b5e9fde3009052653ec3fdf77c5c09 (patch) | |
tree | 45858426901e942a5f1cd8b1f4a5805902e125c0 /src/ViewStyle.h | |
parent | c085f3f8458110eca0874343b45b34acc9827631 (diff) | |
download | scintilla-mirror-d9a4e803d7b5e9fde3009052653ec3fdf77c5c09.tar.gz |
Use =delete for unwanted functions.
Diffstat (limited to 'src/ViewStyle.h')
-rw-r--r-- | src/ViewStyle.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ViewStyle.h b/src/ViewStyle.h index f08fb777a..95e1ffc2c 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -30,24 +30,23 @@ public: class FontNames { private: std::vector<const char *> names; - +public: + FontNames(); // FontNames objects can not be copied FontNames(const FontNames &) = delete; FontNames &operator=(const FontNames &) = delete; -public: - FontNames(); ~FontNames(); void Clear(); const char *Save(const char *name); }; class FontRealised : public FontMeasurements { - // FontRealised objects can not be copied - FontRealised(const FontRealised &) = delete; - FontRealised &operator=(const FontRealised &) = delete; public: Font font; FontRealised(); + // FontRealised objects can not be copied + FontRealised(const FontRealised &) = delete; + FontRealised &operator=(const FontRealised &) = delete; virtual ~FontRealised(); void Realise(Surface &surface, int zoomLevel, int technology, const FontSpecification &fs); }; @@ -177,6 +176,8 @@ public: ViewStyle(); ViewStyle(const ViewStyle &source); + // Can only be copied through copy constructor which ensures font names initialised correctly + ViewStyle &operator=(const ViewStyle &) = delete; ~ViewStyle(); void CalculateMarginWidthAndMask(); void Init(size_t stylesSize_=256); @@ -212,8 +213,6 @@ private: void CreateAndAddFont(const FontSpecification &fs); FontRealised *Find(const FontSpecification &fs); void FindMaxAscentDescent(); - // Can only be copied through copy constructor which ensures font names initialised correctly - ViewStyle &operator=(const ViewStyle &) = delete; }; #ifdef SCI_NAMESPACE |