obj manager.cpp improvements
This commit is contained in:
parent
e4944a067c
commit
dd193fd64d
@ -65,10 +65,10 @@ void ObjectManager::initialize() {
|
|||||||
this->produceObjects();
|
this->produceObjects();
|
||||||
ReturnValue_t return_value = RETURN_FAILED;
|
ReturnValue_t return_value = RETURN_FAILED;
|
||||||
uint32_t error_count = 0;
|
uint32_t error_count = 0;
|
||||||
for (auto it = this->objectList.begin(); it != objectList.end(); it++ ) {
|
for (auto const& it : objectList) {
|
||||||
return_value = it->second->initialize();
|
return_value = it.second->initialize();
|
||||||
if ( return_value != RETURN_OK ) {
|
if ( return_value != RETURN_OK ) {
|
||||||
object_id_t var = it->first;
|
object_id_t var = it.first;
|
||||||
sif::error << "Object 0x" << std::hex << std::setw(8) <<
|
sif::error << "Object 0x" << std::hex << std::setw(8) <<
|
||||||
std::setfill('0')<< var << " failed to initialize " <<
|
std::setfill('0')<< var << " failed to initialize " <<
|
||||||
"with code 0x" << return_value << std::dec << std::endl;
|
"with code 0x" << return_value << std::dec << std::endl;
|
||||||
@ -81,11 +81,10 @@ void ObjectManager::initialize() {
|
|||||||
}
|
}
|
||||||
//Init was successful. Now check successful interconnections.
|
//Init was successful. Now check successful interconnections.
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
for (auto listIter = this->objectList.begin();
|
for (auto const& it : objectList) {
|
||||||
listIter != objectList.end(); listIter++ ) {
|
return_value = it.second->checkObjectConnections();
|
||||||
return_value = listIter->second->checkObjectConnections();
|
|
||||||
if ( return_value != RETURN_OK ) {
|
if ( return_value != RETURN_OK ) {
|
||||||
sif::error << "Object " << std::hex << (int) listIter->first
|
sif::error << "Object " << std::hex << (int) it.first
|
||||||
<< " connection check failed with code 0x" << return_value
|
<< " connection check failed with code 0x" << return_value
|
||||||
<< std::dec << std::endl;
|
<< std::dec << std::endl;
|
||||||
error_count++;
|
error_count++;
|
||||||
|
Loading…
Reference in New Issue
Block a user