code style

This commit is contained in:
john30
2017-01-14 15:02:10 +01:00
parent b3bb2e08ac
commit 54a6c0f673
32 changed files with 484 additions and 665 deletions
+2 -5
View File
@@ -36,8 +36,7 @@
using namespace std;
/** A structure holding all program options. */
struct options
{
struct options {
const char* server; //!< ebusd server host (name or ip) [localhost]
uint16_t port; //!< ebusd server port [8888]
@@ -229,7 +228,6 @@ string fetchData(TCPSocket* socket, bool& listening) {
}
void connect(const char* host, uint16_t port, char* const *args, int argCount) {
TCPClient* client = new TCPClient();
TCPSocket* socket = client->connect(host, port);
@@ -242,8 +240,7 @@ void connect(const char* host, uint16_t port, char* const *args, int argCount) {
if (!once) {
cout << host << ": ";
getline(cin, message);
}
else {
} else {
for (int i = 0; i < argCount; i++) {
if (i > 0) {
message += " ";
+3 -3
View File
@@ -32,8 +32,7 @@
using namespace std;
/** A structure holding all program options. */
struct options
{
struct options {
const char* device; //!< device to write to [/dev/ttyUSB60]
unsigned int time; //!< delay between bytes in us [10000]
@@ -111,8 +110,9 @@ error_t parse_opt(int key, char *arg, struct argp_state *state) {
return EINVAL;
}
opt->dumpFile = arg;
} else
} else {
return ARGP_ERR_UNKNOWN;
}
break;
default:
return ARGP_ERR_UNKNOWN;