mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Fix formatting using clang-format
Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
This commit is contained in:
parent
0be29ffcab
commit
c1410ef8a8
14 changed files with 35 additions and 30 deletions
|
@ -7,9 +7,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <fmt/ostream.h>
|
||||
#include <iostream>
|
||||
#include <jansson.h>
|
||||
#include <fmt/ostream.h>
|
||||
#include <uuid/uuid.h>
|
||||
#include <villas/colors.hpp>
|
||||
#include <villas/common.hpp>
|
||||
|
@ -266,7 +266,7 @@ public:
|
|||
return os;
|
||||
}
|
||||
|
||||
json_t *toJson() const;
|
||||
virtual json_t *toJson() const;
|
||||
|
||||
static bool isValidName(const std::string &name);
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ namespace node {
|
|||
|
||||
enum class RedisMode { KEY, HASH, CHANNEL };
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &os, const enum villas::node::RedisMode &m) {
|
||||
inline std::ostream &operator<<(std::ostream &os,
|
||||
const enum villas::node::RedisMode &m) {
|
||||
switch (m) {
|
||||
case villas::node::RedisMode::KEY:
|
||||
os << "key";
|
||||
|
@ -44,7 +45,6 @@ inline std::ostream &operator<<(std::ostream &os, const enum villas::node::Redis
|
|||
return os;
|
||||
}
|
||||
|
||||
|
||||
class RedisConnection {
|
||||
|
||||
public:
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <fmt/ostream.h>
|
||||
#include <functional>
|
||||
#include <sw/redis++/connection.h>
|
||||
#include <sw/redis++/redis++.h>
|
||||
#include <villas/node/config.hpp>
|
||||
|
@ -62,7 +62,8 @@ inline bool operator==(const tls::TlsOptions &o1, const tls::TlsOptions &o2) {
|
|||
#endif // REDISPP_WITH_TLS
|
||||
}
|
||||
|
||||
inline bool operator==(const ConnectionOptions &o1, const ConnectionOptions &o2) {
|
||||
inline bool operator==(const ConnectionOptions &o1,
|
||||
const ConnectionOptions &o2) {
|
||||
return o1.type == o2.type && o1.host == o2.host && o1.port == o2.port &&
|
||||
o1.path == o2.path && o1.user == o2.user &&
|
||||
o1.password == o2.password && o1.db == o2.db &&
|
||||
|
@ -95,7 +96,7 @@ std::ostream &operator<<(std::ostream &os, const TlsOptions &t) {
|
|||
|
||||
return os;
|
||||
}
|
||||
}
|
||||
} // namespace tls
|
||||
#endif // REDISPP_WITH_TLS
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &os, const ConnectionType &t) {
|
||||
|
@ -141,12 +142,14 @@ inline std::ostream &operator<<(std::ostream &os, const ConnectionOptions &o) {
|
|||
namespace villas {
|
||||
namespace node {
|
||||
#ifdef REDISPP_WITH_URI
|
||||
inline sw::redis::ConnectionOptions make_redis_connection_options(char const *uri) {
|
||||
inline sw::redis::ConnectionOptions
|
||||
make_redis_connection_options(char const *uri) {
|
||||
auto u = sw::redis::Uri{uri};
|
||||
return u.connection_options();
|
||||
}
|
||||
#else
|
||||
inline sw::redis::ConnectionOptions make_redis_connection_options(char const *uri) {
|
||||
inline sw::redis::ConnectionOptions
|
||||
make_redis_connection_options(char const *uri) {
|
||||
return sw::redis::ConnectionOptions{uri};
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#include <villas/queue_signalled.h>
|
||||
|
||||
extern "C" {
|
||||
#include <re/re_sa.h>
|
||||
#include <re/re_rtp.h>
|
||||
#include <re/re_sa.h>
|
||||
}
|
||||
|
||||
namespace villas {
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <fmt/ostream.h>
|
||||
#include <jansson.h>
|
||||
#include <rtc/peerconnection.hpp>
|
||||
#include <rtc/rtc.hpp>
|
||||
#include <fmt/ostream.h>
|
||||
#include <villas/config.hpp>
|
||||
#include <villas/log.hpp>
|
||||
#include <villas/nodes/webrtc/signaling_client.hpp>
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <libwebsockets.h>
|
||||
#include <fmt/ostream.h>
|
||||
#include <libwebsockets.h>
|
||||
#include <villas/buffer.hpp>
|
||||
#include <villas/common.hpp>
|
||||
#include <villas/config.hpp>
|
||||
|
@ -76,7 +76,7 @@ struct websocket_connection {
|
|||
} buffers;
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &os,
|
||||
const struct websocket_connection &c) {
|
||||
const struct websocket_connection &c) {
|
||||
if (c.wsi) {
|
||||
char name[128];
|
||||
|
||||
|
|
|
@ -9,14 +9,15 @@
|
|||
|
||||
#include <bitset>
|
||||
|
||||
#include <fmt/ostream.h>
|
||||
#include <jansson.h>
|
||||
#include <pthread.h>
|
||||
#include <fmt/ostream.h>
|
||||
#include <uuid/uuid.h>
|
||||
#include <villas/colors.hpp>
|
||||
#include <villas/common.hpp>
|
||||
#include <villas/config.hpp>
|
||||
#include <villas/list.hpp>
|
||||
#include <villas/log.hpp>
|
||||
#include <villas/mapping_list.hpp>
|
||||
#include <villas/node.hpp>
|
||||
#include <villas/node_list.hpp>
|
||||
|
@ -26,7 +27,6 @@
|
|||
#include <villas/queue.h>
|
||||
#include <villas/signal_list.hpp>
|
||||
#include <villas/task.hpp>
|
||||
#include <villas/log.hpp>
|
||||
|
||||
// Forward declarations
|
||||
struct pollfd;
|
||||
|
@ -185,6 +185,5 @@ public:
|
|||
|
||||
#ifndef FMT_LEGACY_OSTREAM_FORMATTER
|
||||
template <>
|
||||
class fmt::formatter<villas::node::Path>
|
||||
: public fmt::ostream_formatter {};
|
||||
class fmt::formatter<villas::node::Path> : public fmt::ostream_formatter {};
|
||||
#endif
|
||||
|
|
|
@ -129,7 +129,9 @@ public:
|
|||
|
||||
const uuid_t &getUuid() const { return uuid; }
|
||||
|
||||
struct timespec getStartTime() const { return started; }
|
||||
struct timespec getStartTime() const {
|
||||
return started;
|
||||
}
|
||||
|
||||
#ifdef WITH_API
|
||||
Api *getApi() { return &api; }
|
||||
|
|
|
@ -13,12 +13,13 @@ using namespace villas::node::api;
|
|||
|
||||
Response::Response(Session *s, int c, const std::string &ct, const Buffer &b)
|
||||
: session(s), logger(logging.get("api:response")), buffer(b), code(c),
|
||||
contentType(ct),
|
||||
headers{{"Server:", HTTP_USER_AGENT},
|
||||
{"Access-Control-Allow-Origin:", "*"},
|
||||
{"Access-Control-Allow-Methods:", "GET, POST, OPTIONS"},
|
||||
{"Access-Control-Allow-Headers:", "Content-Type"},
|
||||
{"Access-Control-Max-Age:", "86400"}} {}
|
||||
contentType(ct), headers{
|
||||
{"Server:", HTTP_USER_AGENT},
|
||||
{"Access-Control-Allow-Origin:", "*"},
|
||||
{"Access-Control-Allow-Methods:",
|
||||
"GET, POST, OPTIONS"},
|
||||
{"Access-Control-Allow-Headers:", "Content-Type"},
|
||||
{"Access-Control-Max-Age:", "86400"}} {}
|
||||
|
||||
int Response::writeBody(struct lws *wsi) {
|
||||
int ret;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
#include <lauxlib.h>
|
||||
#include <lua.h>
|
||||
#include <lualib.h>
|
||||
#include <lauxlib.h>
|
||||
};
|
||||
|
||||
#include <villas/exceptions.hpp>
|
||||
|
|
|
@ -60,7 +60,7 @@ NodeCompat::~NodeCompat() {
|
|||
int ret __attribute__((unused));
|
||||
ret = _vt->destroy ? _vt->destroy(this) : 0;
|
||||
|
||||
delete[] (char *)_vd;
|
||||
delete[](char *) _vd;
|
||||
}
|
||||
|
||||
int NodeCompat::prepare() {
|
||||
|
|
|
@ -24,9 +24,9 @@ extern "C" {
|
|||
/* Define RTLAB before including OpalPrint.h for messages to be sent
|
||||
* to the OpalDisplay. Otherwise stdout will be used. */
|
||||
#define RTLAB
|
||||
#include <OpalPrint.h>
|
||||
#include <AsyncApi.h>
|
||||
#include <OpalGenAsyncParamCtrl.h>
|
||||
#include <OpalPrint.h>
|
||||
}
|
||||
|
||||
// Private static storage
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
#include <villas/nodes/rtp.hpp>
|
||||
|
||||
extern "C" {
|
||||
#include <re/re_net.h>
|
||||
#include <re/re_main.h>
|
||||
#include <re/re_types.h>
|
||||
#include <re/re_mbuf.h>
|
||||
#include <re/re_mem.h>
|
||||
#include <re/re_net.h>
|
||||
#include <re/re_sys.h>
|
||||
#include <re/re_types.h>
|
||||
#include <re/re_udp.h>
|
||||
#undef ALIGN_MASK
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ void villas::node::sample_free(struct Sample *s) {
|
|||
if (p)
|
||||
pool_put(p, s);
|
||||
else
|
||||
delete[] (char *)s;
|
||||
delete[](char *) s;
|
||||
}
|
||||
|
||||
int villas::node::sample_alloc_many(struct Pool *p, struct Sample *smps[],
|
||||
|
|
Loading…
Add table
Reference in a new issue