diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-07 22:33:50 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-08 11:35:51 +0200 |
commit | 1978c49bea5b439d993067c055cec47e70db8fd6 (patch) | |
tree | 255caea96a13f95564e6b631be9a4ac55ce33cd9 /src/multilogdevice.cc | |
parent | 3b1278f5459514a6d6364f068ff97b8a0432057b (diff) |
minor refactoring
Diffstat (limited to 'src/multilogdevice.cc')
-rw-r--r-- | src/multilogdevice.cc | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/multilogdevice.cc b/src/multilogdevice.cc index 7452432..cf7c412 100644 --- a/src/multilogdevice.cc +++ b/src/multilogdevice.cc @@ -1,9 +1,10 @@ -/** -------------------------------------------------------------------- +/** * @file multilogdevice.cc * @brief Implementation of the MultilogDevice class * @author Andreas Aardal Hanssen * @date 2003/2023 - * --------------------------------------------------------------- **/ + */ + #include "multilogdevice.h" #include <string> @@ -15,22 +16,17 @@ #include <sys/types.h> #include <unistd.h> -using namespace ::std; -using namespace ::Binc; +using namespace Binc; -//------------------------------------------------------------------------ MultilogDevice::MultilogDevice(int f) : IODevice(f) {} -//------------------------------------------------------------------------ MultilogDevice::~MultilogDevice(void) {} -//------------------------------------------------------------------------ -string MultilogDevice::service(void) const +std::string MultilogDevice::service(void) const { return "log"; } -//------------------------------------------------------------------------ bool MultilogDevice::waitForWrite(void) const { fd_set writeMask; @@ -41,18 +37,16 @@ bool MultilogDevice::waitForWrite(void) const tv.tv_sec = getTimeout(); tv.tv_usec = 0; - int result = select(fileno(stderr) + 1, 0, &writeMask, 0, tv.tv_sec ? &tv : 0); + int result = select(fileno(stderr) + 1, nullptr, &writeMask, nullptr, tv.tv_sec ? &tv : nullptr); return result > 0; } -//------------------------------------------------------------------------ bool MultilogDevice::waitForRead(void) const { return false; } -//------------------------------------------------------------------------ IODevice::WriteResult MultilogDevice::write(void) { for (;;) { @@ -75,7 +69,6 @@ IODevice::WriteResult MultilogDevice::write(void) } } -//------------------------------------------------------------------------ bool MultilogDevice::fillInputBuffer(void) { return false; |