diff --git a/simgear/scene/util/parse_color_test.cxx b/simgear/scene/util/parse_color_test.cxx index 0e6fcdd0..0db7f12c 100644 --- a/simgear/scene/util/parse_color_test.cxx +++ b/simgear/scene/util/parse_color_test.cxx @@ -7,7 +7,7 @@ #include #include - +#include #define VERIFY_COLOR(str, r, g, b, a) \ SG_VERIFY(simgear::parseColor(str, color)) \ @@ -28,7 +28,7 @@ int main (int ac, char ** av) SGPropertyNode color_node, color_arg; color_arg.setStringValue("#000000"); - simgear::PropertyInterpolator* interp = new simgear::ColorInterpolator; + auto interp = std::unique_ptr(new simgear::ColorInterpolator); interp->reset(color_arg); interp->update(color_node, 0.5); // with no color it should immediately set to the target diff --git a/simgear/structure/expression_test.cxx b/simgear/structure/expression_test.cxx index 0ee10154..178e47d9 100644 --- a/simgear/structure/expression_test.cxx +++ b/simgear/structure/expression_test.cxx @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -81,8 +82,8 @@ void testParse() "" ""; - SGPropertyNode* desc = new SGPropertyNode; - readProperties(xml2, strlen(xml2), desc); + auto desc = std::unique_ptr(new SGPropertyNode); + readProperties(xml2, strlen(xml2), desc.get()); SGSharedPtr expr = SGReadDoubleExpression(propertyTree, desc->getChild(0)); @@ -107,4 +108,3 @@ int main(int argc, char* argv[]) cout << __FILE__ << ": All tests passed" << endl; return EXIT_SUCCESS; } - diff --git a/simgear/structure/state_machine_test.cxx b/simgear/structure/state_machine_test.cxx index 558c72b8..167c3b0a 100644 --- a/simgear/structure/state_machine_test.cxx +++ b/simgear/structure/state_machine_test.cxx @@ -14,6 +14,7 @@ #include #include #include +#include #include "StateMachine.hxx" @@ -230,11 +231,11 @@ void testParse() )"; - SGPropertyNode* desc = new SGPropertyNode; - readProperties(xml, strlen(xml), desc); + auto desc = std::unique_ptr(new SGPropertyNode); + readProperties(xml, strlen(xml), desc.get()); SGPropertyNode_ptr root(new SGPropertyNode); - StateMachine_ptr sm = StateMachine::createFromPlist(desc, root); + StateMachine_ptr sm = StateMachine::createFromPlist(desc.get(), root); SG_VERIFY(sm->findStateByName("one") != NULL); SG_VERIFY(sm->findStateByName("two") != NULL); @@ -250,4 +251,3 @@ int main(int argc, char* argv[]) cout << __FILE__ << ": All tests passed" << endl; return EXIT_SUCCESS; } -