Skip to content

Commit d4ddbe6

Browse files
committed
fix(treewide): Fix virtual/override annotations
Signed-off-by: Philipp Jungkamp <philipp.jungkamp@rwth-aachen.de>
1 parent 59e2bad commit d4ddbe6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+148
-152
lines changed

clients/shmem/villas-shmem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Shmem : public Tool {
3434
protected:
3535
std::atomic<bool> stop;
3636

37-
void usage() {
37+
void usage() override {
3838
std::cout
3939
<< "Usage: villas-test-shmem WNAME VECTORIZE" << std::endl
4040
<< " WNAME name of the shared memory object for the output queue"
@@ -47,9 +47,9 @@ class Shmem : public Tool {
4747
printCopyright();
4848
}
4949

50-
void handler(int, siginfo_t *, void *) { stop = true; }
50+
void handler(int, siginfo_t *, void *) override { stop = true; }
5151

52-
int main() {
52+
int main() override {
5353
int ret, readcnt, writecnt, avail;
5454

5555
struct ShmemInterface shm;

common/include/villas/dsp/window_cosine.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CosineWindow : public Window<T> {
2727

2828
T correctionFactor;
2929

30-
virtual T filter(T in, size_type i) const { return in * coefficients[i]; }
30+
T filter(T in, size_type i) const override { return in * coefficients[i]; }
3131

3232
public:
3333
CosineWindow(double a0, double a1, double a2, double a3, double a4,

include/villas/api/request.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class RequestFactory : public plugin::Plugin {
103103

104104
virtual void init(Request *r) { r->logger = getLogger(); }
105105

106-
virtual std::string getType() const { return "api:request"; }
106+
std::string getType() const override { return "api:request"; }
107107

108108
virtual bool isHidden() const { return false; }
109109
};
@@ -117,7 +117,7 @@ class RequestPlugin : public RequestFactory {
117117
public:
118118
RequestPlugin() : RequestFactory(), regex(re) {}
119119

120-
virtual Request *make(Session *s) {
120+
Request *make(Session *s) override {
121121
auto *r = new T(s);
122122

123123
init(r);
@@ -126,12 +126,12 @@ class RequestPlugin : public RequestFactory {
126126
}
127127

128128
// Get plugin name
129-
virtual std::string getName() const { return name; }
129+
std::string getName() const override { return name; }
130130

131131
// Get plugin description
132-
virtual std::string getDescription() const { return desc; }
132+
std::string getDescription() const override { return desc; }
133133

134-
virtual bool match(const std::string &uri, std::smatch &match) const {
134+
bool match(const std::string &uri, std::smatch &match) const override {
135135
return std::regex_match(uri, match, regex);
136136
}
137137
};

include/villas/api/response.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ class JsonResponse : public Response {
6565
JsonResponse(Session *s, int c, json_t *r)
6666
: Response(s, c, "application/json"), response(r) {}
6767

68-
virtual ~JsonResponse();
68+
~JsonResponse() override;
6969

70-
virtual void encodeBody();
70+
void encodeBody() override;
7171
};
7272

7373
class ErrorResponse : public JsonResponse {

include/villas/format.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class FormatFactory : public plugin::Plugin {
127127

128128
virtual void init(Format *f) { f->logger = getLogger(); }
129129

130-
virtual std::string getType() const { return "format"; }
130+
std::string getType() const override { return "format"; }
131131

132132
virtual bool isHidden() const { return false; }
133133
};
@@ -138,17 +138,17 @@ class FormatPlugin : public FormatFactory {
138138
public:
139139
using FormatFactory::FormatFactory;
140140

141-
virtual Format *make() {
141+
Format *make() override {
142142
auto *f = new T(flags);
143143

144144
init(f);
145145

146146
return f;
147147
}
148148

149-
virtual std::string getName() const { return name; }
149+
std::string getName() const override { return name; }
150150

151-
virtual std::string getDescription() const { return desc; }
151+
std::string getDescription() const override { return desc; }
152152
};
153153

154154
} // namespace node

include/villas/formats/villas_binary.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class VillasBinaryFormatPlugin : public FormatFactory {
6060
}
6161

6262
// Get plugin description
63-
virtual std::string getDescription() const {
63+
std::string getDescription() const override {
6464
std::stringstream ss;
6565

6666
ss << "VILLAS binary network format";

include/villas/hook.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ class SingleSignalHook : public Hook {
131131
SingleSignalHook(Path *p, Node *n, int fl, int prio, bool en = true)
132132
: Hook(p, n, fl, prio, en), signalIndex(0) {}
133133

134-
virtual void parse(json_t *json);
134+
void parse(json_t *json) override;
135135

136-
virtual void prepare();
136+
void prepare() override;
137137
};
138138

139139
class MultiSignalHook : public Hook {
@@ -145,11 +145,11 @@ class MultiSignalHook : public Hook {
145145
public:
146146
using Hook::Hook;
147147

148-
virtual void parse(json_t *json);
148+
void parse(json_t *json) override;
149149

150-
virtual void prepare();
150+
void prepare() override;
151151

152-
virtual void check();
152+
void check() override;
153153
};
154154

155155
class LimitHook : public Hook {
@@ -160,7 +160,7 @@ class LimitHook : public Hook {
160160

161161
virtual void setRate(double rate, double maxRate = -1) = 0;
162162

163-
virtual void parse(json_t *json) {
163+
void parse(json_t *json) override {
164164
assert(state == State::INITIALIZED);
165165

166166
state = State::PARSED;
@@ -191,7 +191,7 @@ class HookFactory : public plugin::Plugin {
191191

192192
virtual unsigned getPriority() const = 0;
193193

194-
virtual std::string getType() const { return "hook"; }
194+
std::string getType() const override { return "hook"; }
195195

196196
virtual bool isHidden() const { return false; }
197197
};
@@ -203,21 +203,21 @@ class HookPlugin : public HookFactory {
203203
public:
204204
using HookFactory::HookFactory;
205205

206-
virtual Hook::Ptr make(Path *p, Node *n) {
206+
Hook::Ptr make(Path *p, Node *n) override {
207207
auto h = std::make_shared<T>(p, n, getFlags(), getPriority());
208208

209209
init(h);
210210

211211
return h;
212212
}
213213

214-
virtual std::string getName() const { return name; }
214+
std::string getName() const override { return name; }
215215

216-
virtual std::string getDescription() const { return desc; }
216+
std::string getDescription() const override { return desc; }
217217

218-
virtual int getFlags() const { return flags; }
218+
int getFlags() const override { return flags; }
219219

220-
virtual unsigned getPriority() const { return prio; }
220+
unsigned getPriority() const override { return prio; }
221221
};
222222

223223
} // namespace node

include/villas/hooks/lua.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class LuaHook : public Hook {
105105
public:
106106
LuaHook(Path *p, Node *n, int fl, int prio, bool en = true);
107107

108-
virtual ~LuaHook();
108+
~LuaHook() override;
109109

110110
void parse(json_t *json) override;
111111

include/villas/node.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ class NodeFactory : public villas::plugin::Plugin {
316316
static Node *make(const std::string &type, const uuid_t &id = {},
317317
const std::string &name = "");
318318

319-
virtual std::string getType() const { return "node"; }
319+
std::string getType() const override { return "node"; }
320320

321321
friend std::ostream &operator<<(std::ostream &os, const NodeFactory &f) {
322322
os << f.getName();
@@ -346,21 +346,21 @@ template <typename T, const char *name, const char *desc, int flags = 0,
346346
class NodePlugin : public NodeFactory {
347347

348348
public:
349-
virtual Node *make(const uuid_t &id = {}, const std::string &nme = "") {
349+
Node *make(const uuid_t &id = {}, const std::string &nme = "") override {
350350
T *n = new T(id, nme);
351351

352352
init(n);
353353

354354
return n;
355355
}
356356

357-
virtual int getFlags() const { return flags; }
357+
int getFlags() const override { return flags; }
358358

359-
virtual int getVectorize() const { return vectorize; }
359+
int getVectorize() const override { return vectorize; }
360360

361-
virtual std::string getName() const { return name; }
361+
std::string getName() const override { return name; }
362362

363-
virtual std::string getDescription() const { return desc; }
363+
std::string getDescription() const override { return desc; }
364364
};
365365

366366
} // namespace node

include/villas/node_compat.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class NodeCompat : public Node {
3939

4040
NodeCompat &operator=(const NodeCompat &other);
4141

42-
virtual ~NodeCompat();
42+
~NodeCompat() override;
4343

4444
template <typename T> T *getData() { return static_cast<T *>(_vd); }
4545

0 commit comments

Comments
 (0)