summaryrefslogtreecommitdiff
path: root/src/multilogdevice.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/multilogdevice.cc')
-rw-r--r--src/multilogdevice.cc19
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;