remove unneeded new/delete in Compressor

This commit is contained in:
John Hood
2017-05-07 16:52:30 -04:00
parent 33afb3abc1
commit 54ac38bfd8
+3 -3
View File
@@ -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 );