Fix warnings and increase demo text pool size
Fix three warnings added in fc5df2c, and increase the text pool size in the demo. This would frequently be overflowed, even just by building with the default settings and expanding the log.
This commit is contained in:
parent
8259fe6763
commit
e30a6635a2
@ -716,6 +716,8 @@ public:
|
|||||||
|
|
||||||
void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count)
|
void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count)
|
||||||
{
|
{
|
||||||
|
dtIgnoreUnused(polys);
|
||||||
|
|
||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
dtPolyRef ref = refs[i];
|
dtPolyRef ref = refs[i];
|
||||||
@ -914,6 +916,9 @@ public:
|
|||||||
|
|
||||||
void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count)
|
void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count)
|
||||||
{
|
{
|
||||||
|
dtIgnoreUnused(tile);
|
||||||
|
dtIgnoreUnused(polys);
|
||||||
|
|
||||||
int numLeft = m_maxPolys - m_numCollected;
|
int numLeft = m_maxPolys - m_numCollected;
|
||||||
int toCopy = count;
|
int toCopy = count;
|
||||||
if (toCopy > numLeft)
|
if (toCopy > numLeft)
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static const unsigned TEXT_POOL_SIZE = 8000;
|
static const unsigned TEXT_POOL_SIZE = 50000;
|
||||||
static char g_textPool[TEXT_POOL_SIZE];
|
static char g_textPool[TEXT_POOL_SIZE];
|
||||||
static unsigned g_textPoolSize = 0;
|
static unsigned g_textPoolSize = 0;
|
||||||
static const char* allocText(const char* text)
|
static const char* allocText(const char* text)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user