From 20cce750fabb13e5ad9399ecc4d4c71162b68394 Mon Sep 17 00:00:00 2001 From: Christophe Juniet Date: Wed, 3 Jul 2013 21:34:58 +0200 Subject: [PATCH] Fix a few invalid forward declarations A few forward declarations use mismatched struct and class types. Clang won't compile this with -Werror. --- src/decoder.hpp | 2 -- src/encoder.hpp | 2 -- src/i_decoder.hpp | 3 ++- src/i_encoder.hpp | 2 +- src/v1_encoder.hpp | 2 -- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/decoder.hpp b/src/decoder.hpp index 4ed2eb31..c1280c5c 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -35,8 +35,6 @@ namespace zmq { - class i_msg_sink; - // Helper base class for decoders that know the amount of data to read // in advance at any moment. Knowing the amount in advance is a property // of the protocol used. 0MQ framing protocol is based size-prefixed diff --git a/src/encoder.hpp b/src/encoder.hpp index e30f7d9c..b77adaf0 100644 --- a/src/encoder.hpp +++ b/src/encoder.hpp @@ -40,8 +40,6 @@ namespace zmq { - class i_msg_source; - // Helper base class for encoders. It implements the state machine that // fills the outgoing buffer. Derived classes should implement individual // state machine actions. diff --git a/src/i_decoder.hpp b/src/i_decoder.hpp index 99eddeb0..bcfd05c6 100644 --- a/src/i_decoder.hpp +++ b/src/i_decoder.hpp @@ -26,7 +26,8 @@ namespace zmq { - class i_msg_sink; + // Forward declaration + struct i_msg_sink; // Interface to be implemented by message decoder. diff --git a/src/i_encoder.hpp b/src/i_encoder.hpp index ae491e25..9a0812fb 100644 --- a/src/i_encoder.hpp +++ b/src/i_encoder.hpp @@ -27,7 +27,7 @@ namespace zmq { // Forward declaration - class i_msg_source; + struct i_msg_source; // Interface to be implemented by message encoder. diff --git a/src/v1_encoder.hpp b/src/v1_encoder.hpp index bd09f6fa..0b7ec172 100644 --- a/src/v1_encoder.hpp +++ b/src/v1_encoder.hpp @@ -29,8 +29,6 @@ namespace zmq { - class i_msg_source; - // Encoder for 0MQ framing protocol. Converts messages into data stream. class v1_encoder_t : public encoder_base_t