Handle verbosity correctly in wxICOHandler loading code.

Pass on the "verbose" argument to LoadDib() function instead of always being
verbose in it.

Also remove the unused IsBmp variable.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-03-12 22:54:37 +00:00
parent 5a1c92ea78
commit 0bc354e2d9

View File

@@ -1410,10 +1410,9 @@ bool wxICOHandler::LoadFile(wxImage *image, wxInputStream& stream,
}
bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream,
bool WXUNUSED(verbose), int index)
bool verbose, int index)
{
bool bResult wxDUMMY_INITIALIZE(false);
bool IsBmp = false;
ICONDIR IconDir;
@@ -1487,7 +1486,7 @@ bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream,
if (offset != 0 && stream.SeekI(offset, wxFromCurrent) == wxInvalidOffset)
return false;
bResult = LoadDib(image, stream, true, IsBmp);
bResult = LoadDib(image, stream, verbose, false /* not BMP */);
bool bIsCursorType = (this->GetType() == wxBITMAP_TYPE_CUR) || (this->GetType() == wxBITMAP_TYPE_ANI);
if ( bResult && bIsCursorType && nType == 2 )
{