remove unneeded new/delete in Compressor
This commit is contained in:
@@ -40,11 +40,11 @@ namespace Network {
|
|||||||
private:
|
private:
|
||||||
static const int BUFFER_SIZE = 2048 * 2048; /* effective limit on terminal size */
|
static const int BUFFER_SIZE = 2048 * 2048; /* effective limit on terminal size */
|
||||||
|
|
||||||
unsigned char *buffer;
|
unsigned char buffer[BUFFER_SIZE];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Compressor() : buffer( NULL ) { buffer = new unsigned char[ BUFFER_SIZE ]; }
|
Compressor() {}
|
||||||
~Compressor() { if ( buffer ) { delete[] buffer; } }
|
~Compressor() {}
|
||||||
|
|
||||||
std::string compress_str( const std::string &input );
|
std::string compress_str( const std::string &input );
|
||||||
std::string uncompress_str( const std::string &input );
|
std::string uncompress_str( const std::string &input );
|
||||||
|
|||||||
Reference in New Issue
Block a user