Problem: inconsistent polymorphic inheritance

Solution: consistently use virtual, override and final
This commit is contained in:
Simon Giesecke
2019-12-24 10:39:26 +01:00
parent 6d69898240
commit 628adf1cb7
84 changed files with 525 additions and 487 deletions

View File

@@ -39,7 +39,7 @@ namespace zmq
// Decoder for Web socket framing protocol. Converts data stream into messages.
// The class has to inherit from shared_message_memory_allocator because
// the base class calls allocate in its constructor.
class ws_decoder_t
class ws_decoder_t ZMQ_FINAL
: public decoder_base_t<ws_decoder_t, shared_message_memory_allocator>
{
public:
@@ -47,10 +47,10 @@ class ws_decoder_t
int64_t maxmsgsize_,
bool zero_copy_,
bool must_mask_);
virtual ~ws_decoder_t ();
~ws_decoder_t () ZMQ_FINAL;
// i_decoder interface.
virtual msg_t *msg () { return &_in_progress; }
msg_t *msg () ZMQ_FINAL { return &_in_progress; }
private:
int opcode_ready (unsigned char const *);