Skip to content
Snippets Groups Projects
Commit d8ad5ce3 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

some code cleaning

parent c7d6bf17
No related branches found
No related tags found
No related merge requests found
...@@ -296,8 +296,7 @@ boost::shared_ptr<mtca4u::NDRegisterAccessor<UserType>> Application::createProce ...@@ -296,8 +296,7 @@ boost::shared_ptr<mtca4u::NDRegisterAccessor<UserType>> Application::createProce
// decorate the process variable if testable mode is enabled and this is the receiving end of the variable // decorate the process variable if testable mode is enabled and this is the receiving end of the variable
if(testableMode && node.getDirection() == VariableDirection::feeding) { if(testableMode && node.getDirection() == VariableDirection::feeding) {
mtca4u::NDRegisterAccessor<UserType>* deco = new TestDecoratorRegisterAccessor<UserType>(pvar); pvar = boost::make_shared<TestDecoratorRegisterAccessor<UserType>>(pvar);
pvar.reset(deco);
} }
// return the process variable // return the process variable
...@@ -320,10 +319,8 @@ std::pair< boost::shared_ptr<mtca4u::NDRegisterAccessor<UserType>>, boost::share ...@@ -320,10 +319,8 @@ std::pair< boost::shared_ptr<mtca4u::NDRegisterAccessor<UserType>>, boost::share
// decorate the process variable if testable mode is enabled // decorate the process variable if testable mode is enabled
if(testableMode) { if(testableMode) {
mtca4u::NDRegisterAccessor<UserType>* decoFirst = new TestDecoratorRegisterAccessor<UserType>(pvarPair.first); pvarPair.first = boost::make_shared<TestDecoratorRegisterAccessor<UserType>>(pvarPair.first);
mtca4u::NDRegisterAccessor<UserType>* decoSecond = new TestDecoratorRegisterAccessor<UserType>(pvarPair.second); pvarPair.second = boost::make_shared<TestDecoratorRegisterAccessor<UserType>>(pvarPair.second);
pvarPair.first.reset(decoFirst);
pvarPair.second.reset(decoSecond);
} }
// return the pair // return the pair
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment