replace enums use for compile time constants
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "zlib.h"
|
||||
#include "idatastream.h"
|
||||
#include <vector> // std::size
|
||||
|
||||
/// \brief A wrapper around an InputStream of data compressed with the zlib deflate algorithm.
|
||||
///
|
||||
@@ -32,8 +33,7 @@ class DeflatedInputStream : public InputStream
|
||||
{
|
||||
InputStream& m_istream;
|
||||
z_stream m_zipstream;
|
||||
enum unnamed0 { m_bufsize = 1024 };
|
||||
unsigned char m_buffer[m_bufsize];
|
||||
unsigned char m_buffer[1024];
|
||||
|
||||
public:
|
||||
DeflatedInputStream( InputStream& istream )
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
{
|
||||
if ( m_zipstream.avail_in == 0 ) {
|
||||
m_zipstream.next_in = m_buffer;
|
||||
m_zipstream.avail_in = static_cast<uInt>( m_istream.read( m_buffer, m_bufsize ) );
|
||||
m_zipstream.avail_in = static_cast<uInt>( m_istream.read( m_buffer, std::size( m_buffer ) ) );
|
||||
}
|
||||
if ( inflate( &m_zipstream, Z_SYNC_FLUSH ) != Z_OK ) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user