// Not needed, included in defs.h
// #include "wx/windowid.h"
// Not needed, included in defs.h
// #include "wx/windowid.h"
- wxCHECK_RET(gs_autoIdsRefCount[id] != ID_MAXCOUNT, wxT("id count at max"));
- wxCHECK_RET(gs_autoIdsRefCount[id] != ID_FREE, wxT("id should first be reserved"));
+ wxCHECK_RET(gs_autoIdsRefCount[winid] != ID_MAXCOUNT, wxT("id count at max"));
+ wxCHECK_RET(gs_autoIdsRefCount[winid] != ID_FREE, wxT("id should first be reserved"));
// DecIdRefCount is only called on an ID that has been IncIdRefCount'ed'
// so it should never be reserved, but test anyway
// DecIdRefCount is only called on an ID that has been IncIdRefCount'ed'
// so it should never be reserved, but test anyway
{
// decrease count if it is in the managed range
if ( m_id >= wxID_AUTO_LOWEST && m_id <= wxID_AUTO_HIGHEST )
DecIdRefCount(m_id);
{
// decrease count if it is in the managed range
if ( m_id >= wxID_AUTO_LOWEST && m_id <= wxID_AUTO_HIGHEST )
DecIdRefCount(m_id);
// increase count if it is in the managed range
if ( m_id >= wxID_AUTO_LOWEST && m_id <= wxID_AUTO_HIGHEST )
// increase count if it is in the managed range
if ( m_id >= wxID_AUTO_LOWEST && m_id <= wxID_AUTO_HIGHEST )
// called, and accorind to gs_nextAutoId, their are still
// 50 at the end so it returns them without testing the ref
// To fix this, the next ID is also updated here as needed
// called, and accorind to gs_nextAutoId, their are still
// 50 at the end so it returns them without testing the ref
// To fix this, the next ID is also updated here as needed
{
wxASSERT_MSG(count > 0, wxT("can't unreserve less than 1 id"));
#if wxUSE_AUTOID_MANAGEMENT
while (count--)
{
wxASSERT_MSG(count > 0, wxT("can't unreserve less than 1 id"));
#if wxUSE_AUTOID_MANAGEMENT
while (count--)