From 4815e7beb1d922c270256a1965bb08414734aa70 Mon Sep 17 00:00:00 2001 From: upstream svn Date: Mon, 8 Feb 2010 19:41:47 +0000 Subject: [PATCH] Upstream tarball 10010 --- .svn-revision | 2 +- src/ExternalConn.cpp | 51 --------------------------------------------------- src/ExternalConn.h | 20 ++------------------ src/RLE.h | 21 +-------------------- 4 files changed, 4 insertions(+), 90 deletions(-) diff --git a/.svn-revision b/.svn-revision index 077d04d1..db6b8511 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10009 +10010 diff --git a/src/ExternalConn.cpp b/src/ExternalConn.cpp index 1d066d21..d514e75a 100644 --- a/src/ExternalConn.cpp +++ b/src/ExternalConn.cpp @@ -912,29 +912,6 @@ static CECPacket *Get_EC_Response_Kad_Connect(const CECPacket *request) return response; } -// encoder side -CPartFile_Encoder::CPartFile_Encoder(CPartFile *file) -{ - m_file = file; -} - -CPartFile_Encoder::~CPartFile_Encoder() -{ -} - -// stl side :) -CPartFile_Encoder::CPartFile_Encoder() -{ - m_file = 0; -} - -CPartFile_Encoder &CPartFile_Encoder::operator=(const CPartFile_Encoder &obj) -{ - m_file = obj.m_file; - m_enc_data = obj.m_enc_data; - return *this; -} - void CPartFile_Encoder::Encode(CECTag *parent) { // @@ -986,34 +963,6 @@ void CPartFile_Encoder::Encode(CECTag *parent) requestedblocks.size() * 2 * sizeof(uint64), (void *)&req_buffer[0])); } -// encoder side -CKnownFile_Encoder::CKnownFile_Encoder(CKnownFile *file) : - m_enc_data(file->GetPartCount(), true) -{ - m_file = file; -} - -CKnownFile_Encoder::CKnownFile_Encoder() -{ - m_file = 0; -} - -CKnownFile_Encoder::~CKnownFile_Encoder() -{ -} - -CKnownFile_Encoder::CKnownFile_Encoder(const CKnownFile_Encoder &obj) : m_enc_data(obj.m_enc_data) -{ - m_file = obj.m_file; -} - -CKnownFile_Encoder &CKnownFile_Encoder::operator=(const CKnownFile_Encoder &obj) -{ - m_file = obj.m_file; - m_enc_data = obj.m_enc_data; - return *this; -} - void CKnownFile_Encoder::Encode(CECTag *parent) { // Don't add tag if available parts aren't populated yet. diff --git a/src/ExternalConn.h b/src/ExternalConn.h index 9de9f83d..093bac68 100644 --- a/src/ExternalConn.h +++ b/src/ExternalConn.h @@ -91,16 +91,7 @@ class CPartFile_Encoder { CPartFile *m_file; public: // encoder side - CPartFile_Encoder(CPartFile *file); - - ~CPartFile_Encoder(); - - // stl side :) - CPartFile_Encoder(); - - CPartFile_Encoder(const CPartFile_Encoder &obj) { *this = obj; } - - CPartFile_Encoder &operator=(const CPartFile_Encoder &obj); + CPartFile_Encoder(CPartFile *file = 0) { m_file = file; } // encode - take data from m_file void Encode(CECTag *parent_tag); @@ -120,15 +111,8 @@ class CKnownFile_Encoder { RLE_Data m_enc_data; CKnownFile *m_file; public: - CKnownFile_Encoder(CKnownFile *file); - ~CKnownFile_Encoder(); - - // stl side :) - CKnownFile_Encoder(); - - CKnownFile_Encoder(const CKnownFile_Encoder &obj); + CKnownFile_Encoder(CKnownFile *file = 0) { m_file = file; } - CKnownFile_Encoder &operator=(const CKnownFile_Encoder &obj); // encode - take data from m_file void Encode(CECTag *parent_tag); diff --git a/src/RLE.h b/src/RLE.h index 0b28cdcf..372d3781 100644 --- a/src/RLE.h +++ b/src/RLE.h @@ -35,10 +35,9 @@ class RLE_Data { public: - RLE_Data(int len, bool use_diff) { setup(len, use_diff); } + RLE_Data(int len = 0, bool use_diff = true) { setup(len, use_diff); } // those constructors are for stl containers - RLE_Data() { setup(0, 0); } RLE_Data(const RLE_Data & obj) { setup(obj.m_len, obj.m_use_diff, obj.m_buff); } RLE_Data &operator=(const RLE_Data &); @@ -102,24 +101,6 @@ public: // decoder side - can be used everywhere void DecodeParts(uint8 *partdata, int partlen) { m_part_status.Decode(partdata, partlen); } void DecodeGaps(const class CECTag * tag, ArrayOfUInts64 &outdata); - - PartFileEncoderData() : - m_part_status(0, true), m_gap_status(0, true) - { - } - - // for stl - PartFileEncoderData(const PartFileEncoderData &obj) : - m_part_status(obj.m_part_status), m_gap_status(obj.m_gap_status) - { - } - - PartFileEncoderData &operator=(const PartFileEncoderData &obj) - { - m_part_status = obj.m_part_status; - m_gap_status = obj.m_gap_status; - return *this; - } }; #endif -- 2.11.4.GIT