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