From 1978c49bea5b439d993067c055cec47e70db8fd6 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sat, 7 Oct 2023 22:33:50 +0200 Subject: minor refactoring --- src/multilogdevice.cc | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'src/multilogdevice.cc') 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 @@ -15,22 +16,17 @@ #include #include -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; -- cgit v1.2.3