summaryrefslogtreecommitdiff
path: root/src/iofactory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/iofactory.cc')
-rw-r--r--src/iofactory.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/iofactory.cc b/src/iofactory.cc
index ced087c..abe71b4 100644
--- a/src/iofactory.cc
+++ b/src/iofactory.cc
@@ -5,20 +5,17 @@
* @date 2002, 2003
* ----------------------------------------------------------------- **/
#include "iofactory.h"
+
#include "iodevice.h"
using namespace ::Binc;
using namespace ::std;
//------------------------------------------------------------------------
-IOFactory::IOFactory(void)
-{
-}
+IOFactory::IOFactory(void) {}
//------------------------------------------------------------------------
-IOFactory::~IOFactory(void)
-{
-}
+IOFactory::~IOFactory(void) {}
//------------------------------------------------------------------------
IOFactory &IOFactory::getInstance(void)
@@ -34,8 +31,7 @@ void IOFactory::addDevice(IODevice *dev)
// FIXME: Delete correct object. Now, only IODevice's destructor is
// called, and only IODevice's memory is freed.
- if (ioDevice)
- delete ioDevice;
+ if (ioDevice) delete ioDevice;
IOFactory::getInstance().devices[dev->service()] = dev;
}
@@ -47,8 +43,7 @@ IODevice &IOFactory::getClient(void)
IOFactory &ioFactory = IOFactory::getInstance();
- if (ioFactory.devices.find("client") != ioFactory.devices.end())
- return *ioFactory.devices["client"];
+ if (ioFactory.devices.find("client") != ioFactory.devices.end()) return *ioFactory.devices["client"];
return nulDevice;
}
@@ -60,7 +55,6 @@ IODevice &IOFactory::getLogger(void)
IOFactory &ioFactory = IOFactory::getInstance();
- if (ioFactory.devices.find("log") != ioFactory.devices.end())
- return *ioFactory.devices["log"];
+ if (ioFactory.devices.find("log") != ioFactory.devices.end()) return *ioFactory.devices["log"];
return nulDevice;
}