fixed incorrect assert for the default compression level value
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7a30264c3f
commit
af850422ad
@ -126,8 +126,14 @@ wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream, int level)
|
|||||||
m_deflate->zfree = (free_func)0;
|
m_deflate->zfree = (free_func)0;
|
||||||
m_deflate->opaque = (voidpf)0;
|
m_deflate->opaque = (voidpf)0;
|
||||||
|
|
||||||
if (level == -1) level = Z_DEFAULT_COMPRESSION;
|
if ( level == -1 )
|
||||||
|
{
|
||||||
|
level = Z_DEFAULT_COMPRESSION;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
wxASSERT_MSG(level >= 0 && level <= 9, wxT("wxZlibOutputStream compression level must be between 0 and 9!"));
|
wxASSERT_MSG(level >= 0 && level <= 9, wxT("wxZlibOutputStream compression level must be between 0 and 9!"));
|
||||||
|
}
|
||||||
|
|
||||||
err = deflateInit(m_deflate, level);
|
err = deflateInit(m_deflate, level);
|
||||||
if (err != Z_OK) {
|
if (err != Z_OK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user