[DEV] update etk null
This commit is contained in:
parent
f0e1d48838
commit
14a490222f
@ -37,8 +37,8 @@ appl::InterfaceInput::InterfaceInput(std11::shared_ptr<audio::river::Manager> _m
|
||||
audio::format_int16,
|
||||
_input);
|
||||
}
|
||||
if(m_interface == nullptr) {
|
||||
APPL_ERROR("nullptr interface");
|
||||
if(m_interface == null) {
|
||||
APPL_ERROR("null interface");
|
||||
return;
|
||||
}
|
||||
// set callback mode ...
|
||||
@ -53,8 +53,8 @@ appl::InterfaceInput::InterfaceInput(std11::shared_ptr<audio::river::Manager> _m
|
||||
m_interface->start();
|
||||
}
|
||||
appl::InterfaceInput::~InterfaceInput() {
|
||||
if(m_interface == nullptr) {
|
||||
APPL_ERROR("nullptr interface");
|
||||
if(m_interface == null) {
|
||||
APPL_ERROR("null interface");
|
||||
return;
|
||||
}
|
||||
m_interface->stop();
|
||||
|
@ -26,7 +26,7 @@ appl::InterfaceOutput::~InterfaceOutput() {
|
||||
void appl::InterfaceOutput::onTopicMessage(const audio_msg::AudioBuffer::ConstPtr& _msg) {
|
||||
std11::unique_lock<ethread::Mutex> lock(m_mutex);
|
||||
for (size_t iii=0; iii<m_list.size(); ++iii) {
|
||||
if (m_list[iii] == nullptr) {
|
||||
if (m_list[iii] == null) {
|
||||
continue;
|
||||
}
|
||||
if (m_list[iii]->getName() == _msg->sourceName) {
|
||||
@ -37,7 +37,7 @@ void appl::InterfaceOutput::onTopicMessage(const audio_msg::AudioBuffer::ConstPt
|
||||
}
|
||||
// new interface name:
|
||||
std11::shared_ptr<appl::InterfaceOutputManager> newInterface = std11::make_shared<appl::InterfaceOutputManager>(_msg->sourceName);
|
||||
if (newInterface == nullptr) {
|
||||
if (newInterface == null) {
|
||||
APPL_ERROR("can not generate new interface element...");
|
||||
return;
|
||||
}
|
||||
@ -49,7 +49,7 @@ void appl::InterfaceOutput::onTimer(const ros::TimerEvent& _timer) {
|
||||
std11::unique_lock<ethread::Mutex> lock(m_mutex);
|
||||
etk::Vector<std11::shared_ptr<appl::InterfaceOutputManager> >::iterator it = m_list.begin();
|
||||
while (it != m_list.end()) {
|
||||
if (*it == nullptr) {
|
||||
if (*it == null) {
|
||||
it = m_list.erase(it);
|
||||
continue;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ appl::InterfaceOutputElement::~InterfaceOutputElement() {
|
||||
|
||||
void appl::InterfaceOutputElement::onTopicMessage(const etk::String& _streamName, const audio_msg::AudioBuffer::ConstPtr& _msg) {
|
||||
std11::unique_lock<ethread::Mutex> lock(m_mutex);
|
||||
if (m_interface != nullptr) {
|
||||
if (m_interface != null) {
|
||||
APPL_VERBOSE("Write data : " << m_id << " size= " << _msg->data.size()/m_interface->getInterfaceFormat().getChunkSize());
|
||||
m_interface->write(&_msg->data[0], _msg->data.size()/m_interface->getInterfaceFormat().getChunkSize());
|
||||
m_nbConsecutiveUnderflow = 0;
|
||||
@ -40,8 +40,8 @@ void appl::InterfaceOutputElement::onTopicMessage(const etk::String& _streamName
|
||||
map,
|
||||
format,
|
||||
_streamName);
|
||||
if(m_interface == nullptr) {
|
||||
APPL_ERROR("nullptr interface");
|
||||
if(m_interface == null) {
|
||||
APPL_ERROR("null interface");
|
||||
return;
|
||||
}
|
||||
m_interface->setReadwrite();
|
||||
|
@ -27,7 +27,7 @@ appl::InterfaceOutputManager::~InterfaceOutputManager() {
|
||||
void appl::InterfaceOutputManager::onTopicMessage(const etk::String& _streamName, const audio_msg::AudioBuffer::ConstPtr& _msg) {
|
||||
std11::unique_lock<ethread::Mutex> lock(m_mutex);
|
||||
for (size_t iii=0; iii<m_elementList.size(); ++iii) {
|
||||
if (m_elementList[iii] == nullptr) {
|
||||
if (m_elementList[iii] == null) {
|
||||
continue;
|
||||
}
|
||||
if(m_elementList[iii]->getId() == _msg->sourceId) {
|
||||
@ -37,8 +37,8 @@ void appl::InterfaceOutputManager::onTopicMessage(const etk::String& _streamName
|
||||
}
|
||||
// no interface found => create a new one
|
||||
std11::shared_ptr<appl::InterfaceOutputElement> interface = std11::make_shared<appl::InterfaceOutputElement>(m_manager, _msg->sourceId);
|
||||
if(interface == nullptr) {
|
||||
APPL_ERROR("nullptr interface");
|
||||
if(interface == null) {
|
||||
APPL_ERROR("null interface");
|
||||
return;
|
||||
}
|
||||
m_elementList.pushBack(interface);
|
||||
@ -50,7 +50,7 @@ bool appl::InterfaceOutputManager::onTimer() {
|
||||
etk::Vector<std11::shared_ptr<appl::InterfaceOutputElement> >::iterator it = m_elementList.begin();
|
||||
bool oneElementRemoved = false;
|
||||
while (it != m_elementList.end()) {
|
||||
if (*it == nullptr) {
|
||||
if (*it == null) {
|
||||
it = m_elementList.erase(it);
|
||||
continue;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ bool f_create(audio_core::create::Request& _req,
|
||||
audio::convertFormat(_req.channelFormat),
|
||||
_req.frequency,
|
||||
audio::convertChannel(_req.channelMap));
|
||||
if (newInterface == nullptr) {
|
||||
if (newInterface == null) {
|
||||
_res.handle = -1;
|
||||
return false;
|
||||
}
|
||||
@ -51,7 +51,7 @@ bool f_remove(audio_core::remove::Request& _req,
|
||||
std11::shared_ptr<appl::InterfaceOutput> interface;
|
||||
mutex.lock();
|
||||
for(size_t iii=0; iii<g_listInterafceOut.size(); ++iii) {
|
||||
if (g_listInterafceOut[iii] == nullptr) {
|
||||
if (g_listInterafceOut[iii] == null) {
|
||||
continue;
|
||||
}
|
||||
if (g_listInterafceOut[iii]->getId() == _req.handle) {
|
||||
@ -63,7 +63,7 @@ bool f_remove(audio_core::remove::Request& _req,
|
||||
}
|
||||
}
|
||||
mutex.unlock();
|
||||
if (interface == nullptr) {
|
||||
if (interface == null) {
|
||||
APPL_ERROR("remove : [" << _req.handle << "] Can not remove this ==> already removed.");
|
||||
return false;
|
||||
}
|
||||
@ -84,7 +84,7 @@ bool f_getBufferTime(audio_core::getBufferTime::Request& _req,
|
||||
mutex.lock();
|
||||
// Find the handle:
|
||||
for(size_t iii=0; iii<g_listInterafceOut.size(); ++iii) {
|
||||
if (g_listInterafceOut[iii] == nullptr) {
|
||||
if (g_listInterafceOut[iii] == null) {
|
||||
continue;
|
||||
}
|
||||
if (g_listInterafceOut[iii]->getId() == _req.handle) {
|
||||
@ -93,7 +93,7 @@ bool f_getBufferTime(audio_core::getBufferTime::Request& _req,
|
||||
}
|
||||
}
|
||||
mutex.unlock();
|
||||
if (interface == nullptr) {
|
||||
if (interface == null) {
|
||||
APPL_ERROR("getBufferTime : [" << _req.handle << "] Can not get time ==> handle does not exist...");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user