[DEBUG] missing return

This commit is contained in:
Edouard DUPIN 2015-01-26 21:47:51 +01:00
parent 51d16858c5
commit f9c3b51f93
2 changed files with 30 additions and 8 deletions

View File

@ -25,6 +25,7 @@ bool airtalgo::Process::push(std::chrono::system_clock::time_point& _time,
size_t nbChunkOut; size_t nbChunkOut;
AIRTALGO_VERBOSE(" Interface DIRECT "); AIRTALGO_VERBOSE(" Interface DIRECT ");
process(_time, _data, _nbChunk, out, nbChunkOut); process(_time, _data, _nbChunk, out, nbChunkOut);
return true;
} }
bool airtalgo::Process::pull(std::chrono::system_clock::time_point& _time, bool airtalgo::Process::pull(std::chrono::system_clock::time_point& _time,
@ -46,6 +47,7 @@ bool airtalgo::Process::pull(std::chrono::system_clock::time_point& _time,
nbChunkIn = 32; nbChunkIn = 32;
} }
process(_time, in, nbChunkIn, _data, _nbChunk); process(_time, in, nbChunkIn, _data, _nbChunk);
return true;
} }
bool airtalgo::Process::process(std::chrono::system_clock::time_point& _time, bool airtalgo::Process::process(std::chrono::system_clock::time_point& _time,
@ -66,6 +68,7 @@ bool airtalgo::Process::process(std::chrono::system_clock::time_point& _time,
_inNbChunk = _outNbChunk; _inNbChunk = _outNbChunk;
} }
} }
return true;
} }
void airtalgo::Process::pushBack(const std::shared_ptr<airtalgo::Algo>& _algo) { void airtalgo::Process::pushBack(const std::shared_ptr<airtalgo::Algo>& _algo) {

View File

@ -68,6 +68,25 @@ namespace airtalgo{
void clear() { void clear() {
m_listAlgo.clear(); m_listAlgo.clear();
} }
template<typename T> void removeIfFirst() {
if (m_listAlgo.size() > 0) {
std::shared_ptr<T> algoEP = std::dynamic_pointer_cast<T>(m_listAlgo[0]);
if (algoEP != nullptr) {
m_listAlgo.erase(m_listAlgo.begin());
}
}
}
template<typename T> void removeIfLast() {
if (m_listAlgo.size() > 0) {
std::shared_ptr<T> algoEP = std::dynamic_pointer_cast<T>(m_listAlgo[m_listAlgo.size()-1]);
if (algoEP != nullptr) {
m_listAlgo.erase(m_listAlgo.begin()+m_listAlgo.size()-1);
}
}
}
template<typename T> std::shared_ptr<T> get(int32_t _id) {
return std::dynamic_pointer_cast<T>(m_listAlgo[_id]);
}
}; };
}; };