mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-08-15 23:59:59 +00:00
Fix compiler error due to memset on type with non-trivial constructors
Fix #446
This commit is contained in:
@@ -34,6 +34,10 @@ class TestCase
|
||||
{
|
||||
Test() :
|
||||
type(),
|
||||
spos(),
|
||||
epos(),
|
||||
nspos(),
|
||||
nepos(),
|
||||
radius(0),
|
||||
includeFlags(0),
|
||||
excludeFlags(0),
|
||||
|
||||
@@ -154,8 +154,7 @@ bool TestCase::load(const std::string& filePath)
|
||||
else if (row[0] == 'p' && row[1] == 'f')
|
||||
{
|
||||
// Pathfind test.
|
||||
Test* test = new Test;
|
||||
memset(test, 0, sizeof(Test));
|
||||
Test* test = new Test();
|
||||
test->type = TEST_PATHFIND;
|
||||
test->expand = false;
|
||||
test->next = m_tests;
|
||||
@@ -168,8 +167,7 @@ bool TestCase::load(const std::string& filePath)
|
||||
else if (row[0] == 'r' && row[1] == 'c')
|
||||
{
|
||||
// Pathfind test.
|
||||
Test* test = new Test;
|
||||
memset(test, 0, sizeof(Test));
|
||||
Test* test = new Test();
|
||||
test->type = TEST_RAYCAST;
|
||||
test->expand = false;
|
||||
test->next = m_tests;
|
||||
|
||||
Reference in New Issue
Block a user