diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-22 21:11:03 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-22 21:11:03 +0100 |
commit | 63636d3d211b92e5adb9653db9b06b62278cb889 (patch) | |
tree | 05c25428afd72d5dab2aa1e8815131287c04bbb2 | |
parent | 26623a58f009babaf2f773f8374249817407990c (diff) | |
download | dabmux-63636d3d211b92e5adb9653db9b06b62278cb889.tar.gz dabmux-63636d3d211b92e5adb9653db9b06b62278cb889.tar.bz2 dabmux-63636d3d211b92e5adb9653db9b06b62278cb889.zip |
correct 'forbid copying a DabInputCompatible'
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | src/dabInput.h | 8 |
2 files changed, 6 insertions, 3 deletions
@@ -28,3 +28,4 @@ cscope.out ctags tags .clang_complete +.ycm_extra_conf.py* diff --git a/src/dabInput.h b/src/dabInput.h index e5c89da..12823b8 100644 --- a/src/dabInput.h +++ b/src/dabInput.h @@ -55,6 +55,8 @@ class DabInputBase { virtual int close() = 0; virtual ~DabInputBase() {}; + protected: + DabInputBase() {}; }; /* Wrapper class for old-style dabInputOperations inputs */ @@ -67,9 +69,6 @@ class DabInputCompatible : public DabInputBase { virtual ~DabInputCompatible() { m_ops.clean(&args); } - DabInputCompatible& operator=(const DabInputCompatible& other); - DabInputCompatible(const DabInputCompatible& other); - virtual int open(const std::string name) { return m_ops.open(args, name.c_str()); } @@ -103,6 +102,9 @@ class DabInputCompatible : public DabInputBase { virtual dabInputOperations getOpts() { return m_ops; } private: + DabInputCompatible& operator=(const DabInputCompatible& other); + DabInputCompatible(const DabInputCompatible& other); + dabInputOperations m_ops; void* args; }; |