diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-20 21:54:26 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-20 21:54:26 +0100 |
commit | b73e13d70477549bfb970fc4fc005473223a4402 (patch) | |
tree | 849a167c41b197d769666d093ed18cc386aafa5e /src/dabOutput/dabOutput.h | |
parent | ca4fb30104c5f883794c40f2516636447ea5dd0f (diff) | |
download | dabmux-b73e13d70477549bfb970fc4fc005473223a4402.tar.gz dabmux-b73e13d70477549bfb970fc4fc005473223a4402.tar.bz2 dabmux-b73e13d70477549bfb970fc4fc005473223a4402.zip |
fix some cppcheck errors
Diffstat (limited to 'src/dabOutput/dabOutput.h')
-rw-r--r-- | src/dabOutput/dabOutput.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/dabOutput/dabOutput.h b/src/dabOutput/dabOutput.h index 5cb619f..bbf27e3 100644 --- a/src/dabOutput/dabOutput.h +++ b/src/dabOutput/dabOutput.h @@ -134,13 +134,16 @@ class DabOutputRaw : public DabOutput #ifndef _WIN32 isCyclades_ = other.isCyclades_; #endif - buffer_ = other.buffer_; + buffer_ = new unsigned char[6144]; + memcpy(buffer_, other.buffer_, 6144); } ~DabOutputRaw() { delete[] buffer_; } + const DabOutputRaw operator=(const DabOutputRaw& other); + int Open(const char* name); int Write(void* buffer, int size); int Close(); @@ -164,11 +167,11 @@ class DabOutputUdp : public DabOutput socket_ = new UdpSocket(); } - DabOutputUdp(const DabOutputUdp& other) - { - packet_ = other.packet_; - socket_ = other.socket_; - } + // make sure we don't copy this output around + // the UdpPacket and UdpSocket do not support + // copying either + DabOutputUdp(const DabOutputUdp& other); + DabOutputUdp operator=(const DabOutputUdp& other); ~DabOutputUdp() { delete socket_; @@ -195,12 +198,8 @@ class DabOutputTcp : public DabOutput client = NULL; } - DabOutputTcp(const DabOutputTcp& other) - { - server = other.server; - client = other.client; - thread_ = other.thread_; - } + DabOutputTcp(const DabOutputTcp& other); + DabOutputTcp operator=(const DabOutputTcp& other); ~DabOutputTcp() { |