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