Changed explicit nullptr to more C++-like reset()
This commit is contained in:
parent
8429dfa4e8
commit
d0854ae84b
@ -301,7 +301,7 @@ void StreamMgr::stopStream(const StreamType t) {
|
|||||||
throw rte("Input stream is not running");
|
throw rte("Input stream is not running");
|
||||||
}
|
}
|
||||||
/// Kills input stream
|
/// Kills input stream
|
||||||
_inputStream = nullptr;
|
_inputStream.reset();
|
||||||
/// Send reset to all in data handlers
|
/// Send reset to all in data handlers
|
||||||
for (auto &handler : _inDataHandlers) {
|
for (auto &handler : _inDataHandlers) {
|
||||||
handler->reset(nullptr);
|
handler->reset(nullptr);
|
||||||
@ -309,13 +309,13 @@ void StreamMgr::stopStream(const StreamType t) {
|
|||||||
} break;
|
} break;
|
||||||
case (StreamType::output): {
|
case (StreamType::output): {
|
||||||
if (_inputStream && _inputStream->duplexMode()) {
|
if (_inputStream && _inputStream->duplexMode()) {
|
||||||
_inputStream = nullptr;
|
_inputStream.reset();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (!_outputStream) {
|
if (!_outputStream) {
|
||||||
throw rte("Output stream is not running");
|
throw rte("Output stream is not running");
|
||||||
}
|
}
|
||||||
_outputStream = nullptr;
|
_outputStream.reset();
|
||||||
} // end else
|
} // end else
|
||||||
} break;
|
} break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user