forked from 0ad/0ad
Loader: reword comment
EntityHandles.cpp: 4096 -> MAX_HANDLES This was SVN commit r2259.
This commit is contained in:
parent
8683e6a3ec
commit
229a6b7a16
@ -60,8 +60,9 @@ but yields significant advantages:
|
||||
* input is important, since we want to be able to abort long loads or
|
||||
even exit the game immediately.
|
||||
|
||||
Examples of tasks that take so long, and typical 'coroutine' (more correcly
|
||||
'generator') implementations may be seen in MapReader.cpp.
|
||||
We therefore go with the 'coroutine' (more correctly 'generator') approach.
|
||||
Examples of tasks that take so long and typical implementations may
|
||||
be seen in MapReader.cpp.
|
||||
|
||||
|
||||
Intended Use
|
||||
|
@ -67,7 +67,7 @@ void HEntity::addRef()
|
||||
{
|
||||
if( m_handle != INVALID_HANDLE )
|
||||
{
|
||||
assert( m_handle < 4096 );
|
||||
assert( m_handle < MAX_HANDLES );
|
||||
g_EntityManager.m_entities[m_handle].m_refcount++;
|
||||
}
|
||||
}
|
||||
@ -118,7 +118,7 @@ const u8 *HEntity::Deserialize(const u8 *buffer, const u8 *end)
|
||||
{
|
||||
Deserialize_int_2(buffer, m_handle);
|
||||
// We can't let addRef assert just because someone sent us bogus data
|
||||
if (m_handle < 4096 && m_handle != INVALID_HANDLE)
|
||||
if (m_handle < MAX_HANDLES && m_handle != INVALID_HANDLE)
|
||||
addRef();
|
||||
return buffer;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user