diff --git a/RecastDemo/Include/TestCase.h b/RecastDemo/Include/TestCase.h index f61cc85..49dcb23 100644 --- a/RecastDemo/Include/TestCase.h +++ b/RecastDemo/Include/TestCase.h @@ -34,6 +34,10 @@ class TestCase { Test() : type(), + spos(), + epos(), + nspos(), + nepos(), radius(0), includeFlags(0), excludeFlags(0), diff --git a/RecastDemo/Source/TestCase.cpp b/RecastDemo/Source/TestCase.cpp index cf1214a..5ce4262 100644 --- a/RecastDemo/Source/TestCase.cpp +++ b/RecastDemo/Source/TestCase.cpp @@ -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;