use own namespace

This commit is contained in:
john30
2017-01-14 16:41:54 +01:00
parent 7bd9446f13
commit 774e01e937
43 changed files with 196 additions and 48 deletions
+4 -2
View File
@@ -32,8 +32,10 @@
#include <string>
#include "tcpsocket.h"
using namespace std;
using std::ostringstream;
using std::cin;
using std::cout;
using std::endl;
/** A structure holding all program options. */
struct options {
+11 -2
View File
@@ -28,8 +28,17 @@
#include <fstream>
#include <iomanip>
#include "device.h"
#include "result.h"
using namespace std;
using std::hex;
using std::fstream;
using std::cout;
using std::endl;
using std::setw;
using std::setfill;
using std::ios;
using ebusd::result_t;
using ebusd::Device;
/** A structure holding all program options. */
struct options {
@@ -133,7 +142,7 @@ int main(int argc, char* argv[]) {
return EINVAL;
}
result_t result = device->open();
if (result != RESULT_OK) {
if (result != ebusd::RESULT_OK) {
cout << "unable to open " << opt.device << ": " << getResultCode(result) << endl;
}
if (!device->isValid()) {