Casting NULL to iterators is not portable, use end().

This commit is contained in:
joerg 2013-05-28 19:00:04 +00:00
parent cd991d2861
commit ae3abddfb9
2 changed files with 39 additions and 3 deletions

View file

@ -1,10 +1,10 @@
$NetBSD: distinfo,v 1.19 2012/06/28 05:21:19 sbd Exp $
$NetBSD: distinfo,v 1.20 2013/05/28 19:00:04 joerg Exp $
SHA1 (unalz-0.61.tgz) = a6cab2a02b7f44957211e694b7d8d144840b2255
RMD160 (unalz-0.61.tgz) = 68cb957aeacfc8452e01637f7e0a50939d515ab6
Size (unalz-0.61.tgz) = 138152 bytes
SHA1 (patch-UnAlz.h) = c21ec95926b716adf3c6d7145a17440bbb1e81ad
SHA1 (patch-aa) = 327fd080040946fe7a0707698f90d7709a2d3c5b
SHA1 (patch-ab) = 0289c84cabc47c4be22fe2a36e06888a10d283b0
SHA1 (patch-ab) = 5dca0ba5d5b6b99c3b6985195e6fc52dc89fae44
SHA1 (patch-ac) = 00c6255437f4ebdf3676787ed63cc838a16476d4
SHA1 (patch-ad) = 0a830c3995600d0c25ae1b32c00df2d0604571d7

View file

@ -1,4 +1,4 @@
$NetBSD: patch-ab,v 1.12 2012/06/28 05:21:19 sbd Exp $
$NetBSD: patch-ab,v 1.13 2013/05/28 19:00:04 joerg Exp $
* Use system/buildlinked headers.
* The correct type for get_crc_table with zlib 1.2.7 is z_crc_t*
@ -13,6 +13,42 @@ $NetBSD: patch-ab,v 1.12 2012/06/28 05:21:19 sbd Exp $
#include "UnAlz.h"
// utime ÇÔ¼ö ó¸®
@@ -159,7 +159,7 @@ CUnAlz::CUnAlz()
{
memset(m_files, 0, sizeof(m_files));
m_nErr = ERR_NOERR;
- m_posCur = (FileList::iterator)NULL;
+ m_posCur = m_fileList.end();
m_pFuncCallBack = NULL;
m_pCallbackParam = NULL;
m_bHalt = FALSE;
@@ -331,7 +331,7 @@ void CUnAlz::Close()
i->Clear();
}
- m_posCur = (FileList::iterator)NULL;
+ m_posCur = m_fileList.end();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -641,7 +641,7 @@ BOOL CUnAlz::SetCurrentFile(const char*
}
}
- m_posCur = (FileList::iterator)NULL;
+ m_posCur = m_fileList.end();
return FALSE;
}
@@ -682,7 +682,7 @@ BOOL CUnAlz::ExtractCurrentFileToBuf(BYT
////////////////////////////////////////////////////////////////////////////////////////////////////
BOOL CUnAlz::ExtractCurrentFile(const char* szDestPathName, const char* szDestFileName)
{
- if(m_posCur==(FileList::iterator)NULL) {ASSERT(0); return FALSE;}
+ if(m_posCur==m_fileList.end()) {ASSERT(0); return FALSE;}
BOOL ret=FALSE;
@@ -1891,7 +1891,11 @@ void CUnAlz::DecryptingData(int nSize, B
////////////////////////////////////////////////////////////////////////////////////////////////////
UINT32 CUnAlz::CRC32(UINT32 l, BYTE c)