From 9472b43539e7b4a6a3f5e657b0ec06e9e6e5eab9 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 28 Apr 2018 10:31:25 +1000 Subject: Delete standard functions on classes where there could be attempts to copy. --- src/ViewStyle.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ViewStyle.h') diff --git a/src/ViewStyle.h b/src/ViewStyle.h index c2e052e03..2a4e7329a 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -32,7 +32,9 @@ public: FontNames(); // FontNames objects can not be copied. FontNames(const FontNames &) = delete; + FontNames(FontNames &&) = delete; FontNames &operator=(const FontNames &) = delete; + FontNames &operator=(FontNames &&) = delete; ~FontNames(); void Clear(); const char *Save(const char *name); @@ -44,7 +46,9 @@ public: FontRealised(); // FontRealised objects can not be copied. FontRealised(const FontRealised &) = delete; + FontRealised(FontRealised &&) = delete; FontRealised &operator=(const FontRealised &) = delete; + FontRealised &operator=(FontRealised &&) = delete; virtual ~FontRealised(); void Realise(Surface &surface, int zoomLevel, int technology, const FontSpecification &fs); }; @@ -174,8 +178,10 @@ public: ViewStyle(); ViewStyle(const ViewStyle &source); + ViewStyle(ViewStyle &&) = delete; // Can only be copied through copy constructor which ensures font names initialised correctly ViewStyle &operator=(const ViewStyle &) = delete; + ViewStyle &operator=(ViewStyle &&) = delete; ~ViewStyle(); void CalculateMarginWidthAndMask(); void Init(size_t stylesSize_=256); -- cgit v1.2.3