add clang-format to repo for style
Add .clang-format to repo for style.
Change-Id: I286b3b245550d6a736d7df797f0ce21b51d7a235
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/slp_server.hpp b/slp_server.hpp
index 0ab12c9..c890ced 100644
--- a/slp_server.hpp
+++ b/slp_server.hpp
@@ -1,14 +1,15 @@
#pragma once
-#include <iostream>
-#include <string>
+#include "slp.hpp"
+#include "slp_meta.hpp"
+
#include <sys/types.h>
#include <systemd/sd-bus.h>
#include <systemd/sd-daemon.h>
#include <systemd/sd-event.h>
-#include "slp_meta.hpp"
-#include "slp.hpp"
+#include <iostream>
+#include <string>
namespace slp
{
@@ -23,24 +24,20 @@
class Server
{
- public:
+ public:
+ Server() : Server(slp::PORT, nullptr){};
- Server(): Server(slp::PORT, nullptr) {};
+ Server(uint16_t port, sd_event_io_handler_t cb) : port(port), callme(cb){};
- Server(uint16_t port, sd_event_io_handler_t cb):
- port(port),
- callme(cb) {};
+ Server(const Server&) = delete;
+ Server& operator=(const Server&) = delete;
+ Server(Server&&) = default;
+ Server& operator=(Server&&) = default;
- Server(const Server&) = delete;
- Server& operator=(const Server&) = delete;
- Server(Server&&) = default;
- Server& operator=(Server &&) = default;
+ uint16_t port;
+ sd_event_io_handler_t callme;
- uint16_t port;
- sd_event_io_handler_t callme;
-
- int run();
-
+ int run();
};
-}//namespce udp
-}//namespace slp
+} // namespace udp
+} // namespace slp