Skip to content
Snippets Groups Projects
Commit 4aca35a5 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

defaul_types: add override

parent 3596f8a9
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ struct DhtMessage : public Value::Serializable<DhtMessage> ...@@ -43,7 +43,7 @@ struct DhtMessage : public Value::Serializable<DhtMessage>
} }
static const ValueType TYPE; static const ValueType TYPE;
virtual const ValueType& getType() const { virtual const ValueType& getType() const override {
return TYPE; return TYPE;
} }
static Value::Filter getFilter() { return {}; } static Value::Filter getFilter() { return {}; }
...@@ -64,7 +64,7 @@ public: ...@@ -64,7 +64,7 @@ public:
template <typename Type> template <typename Type>
struct SignedValue : public Value::Serializable<Type> struct SignedValue : public Value::Serializable<Type>
{ {
virtual void unpackValue(const Value& v) { virtual void unpackValue(const Value& v) override {
from = v.owner.getId(); from = v.owner.getId();
Value::Serializable<Type>::unpackValue(v); Value::Serializable<Type>::unpackValue(v);
} }
...@@ -78,7 +78,7 @@ public: ...@@ -78,7 +78,7 @@ public:
template <typename Type> template <typename Type>
struct EncryptedValue : public SignedValue<Type> struct EncryptedValue : public SignedValue<Type>
{ {
virtual void unpackValue(const Value& v) { virtual void unpackValue(const Value& v) override {
to = v.recipient; to = v.recipient;
SignedValue<Type>::unpackValue(v); SignedValue<Type>::unpackValue(v);
} }
...@@ -100,13 +100,13 @@ struct ImMessage : public SignedValue<ImMessage> ...@@ -100,13 +100,13 @@ struct ImMessage : public SignedValue<ImMessage>
: sent(std::chrono::system_clock::now()), im_message(std::move(msg)) {} : sent(std::chrono::system_clock::now()), im_message(std::move(msg)) {}
static const ValueType TYPE; static const ValueType TYPE;
virtual const ValueType& getType() const { virtual const ValueType& getType() const override {
return TYPE; return TYPE;
} }
static Value::Filter getFilter() { static Value::Filter getFilter() {
return SignedValue::getFilter(); return SignedValue::getFilter();
} }
virtual void unpackValue(const Value& v) { virtual void unpackValue(const Value& v) override {
to = v.recipient; to = v.recipient;
SignedValue::unpackValue(v); SignedValue::unpackValue(v);
} }
...@@ -124,7 +124,7 @@ struct TrustRequest : public EncryptedValue<TrustRequest> ...@@ -124,7 +124,7 @@ struct TrustRequest : public EncryptedValue<TrustRequest>
TrustRequest(std::string s, const Blob& d) : service(s), payload(d) {} TrustRequest(std::string s, const Blob& d) : service(s), payload(d) {}
static const ValueType TYPE; static const ValueType TYPE;
virtual const ValueType& getType() const { virtual const ValueType& getType() const override {
return TYPE; return TYPE;
} }
static Value::Filter getFilter() { static Value::Filter getFilter() {
...@@ -142,7 +142,7 @@ struct IceCandidates : public EncryptedValue<IceCandidates> ...@@ -142,7 +142,7 @@ struct IceCandidates : public EncryptedValue<IceCandidates>
IceCandidates(Value::Id msg_id, Blob ice) : id(msg_id), ice_data(ice) {} IceCandidates(Value::Id msg_id, Blob ice) : id(msg_id), ice_data(ice) {}
static const ValueType TYPE; static const ValueType TYPE;
virtual const ValueType& getType() const { virtual const ValueType& getType() const override {
return TYPE; return TYPE;
} }
static Value::Filter getFilter() { static Value::Filter getFilter() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment