aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-04-19 17:44:09 +1000
committerNeil <nyamatongwe@gmail.com>2017-04-19 17:44:09 +1000
commitd9a4e803d7b5e9fde3009052653ec3fdf77c5c09 (patch)
tree45858426901e942a5f1cd8b1f4a5805902e125c0 /win32
parentc085f3f8458110eca0874343b45b34acc9827631 (diff)
downloadscintilla-mirror-d9a4e803d7b5e9fde3009052653ec3fdf77c5c09.tar.gz
Use =delete for unwanted functions.
Diffstat (limited to 'win32')
-rw-r--r--win32/PlatWin.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 3b45e5e4b..75d981def 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -457,9 +457,6 @@ void Font::Release() {
template<typename T, int lengthStandard>
class VarBuffer {
T bufferStandard[lengthStandard];
- // Private so VarBuffer objects can not be copied
- VarBuffer(const VarBuffer &);
- VarBuffer &operator=(const VarBuffer &);
public:
T *buffer;
explicit VarBuffer(size_t length) : buffer(0) {
@@ -469,6 +466,9 @@ public:
buffer = bufferStandard;
}
}
+ // Deleted so VarBuffer objects can not be copied
+ VarBuffer(const VarBuffer &) = delete;
+ VarBuffer &operator=(const VarBuffer &) = delete;
~VarBuffer() {
if (buffer != bufferStandard) {
delete []buffer;
@@ -513,11 +513,11 @@ class SurfaceGDI : public Surface {
void BrushColor(ColourDesired back);
void SetFont(Font &font_);
- // Private so SurfaceGDI objects can not be copied
- SurfaceGDI(const SurfaceGDI &);
- SurfaceGDI &operator=(const SurfaceGDI &);
public:
SurfaceGDI();
+ // Deleted so SurfaceGDI objects can not be copied
+ SurfaceGDI(const SurfaceGDI &) = delete;
+ SurfaceGDI &operator=(const SurfaceGDI &) = delete;
~SurfaceGDI() override;
void Init(WindowID wid) override;
@@ -1071,11 +1071,11 @@ class SurfaceD2D : public Surface {
void SetFont(Font &font_);
- // Private so SurfaceD2D objects can not be copied
- SurfaceD2D(const SurfaceD2D &);
- SurfaceD2D &operator=(const SurfaceD2D &);
public:
SurfaceD2D();
+ // Deleted so SurfaceD2D objects can not be copied
+ SurfaceD2D(const SurfaceD2D &) = delete;
+ SurfaceD2D &operator=(const SurfaceD2D &) = delete;
virtual ~SurfaceD2D() override;
void SetScale();