Commit d6952ded authored by Simon Giesecke's avatar Simon Giesecke

Problem: unused include directives and redundant forward declarations

Solution: removed
parent 04ec6aaf
......@@ -31,7 +31,6 @@
#define __ZMQ_CLIENT_HPP_INCLUDED__
#include "socket_base.hpp"
#include "session_base.hpp"
#include "fq.hpp"
#include "lb.hpp"
......@@ -41,7 +40,6 @@ class ctx_t;
class msg_t;
class pipe_t;
class io_thread_t;
class socket_base_t;
class client_t : public socket_base_t
{
......
......@@ -57,11 +57,6 @@
#endif
#if defined ZMQ_HAVE_OSX
#include <mach/clock.h>
#include <mach/mach.h>
#include <time.h>
#include <sys/time.h>
int alt_clock_gettime (int clock_id, timespec *ts)
{
clock_serv_t cclock;
......
......@@ -33,17 +33,19 @@
#include "stdint.hpp"
#if defined ZMQ_HAVE_OSX
#include <mach/clock.h>
#include <mach/mach.h>
#include <time.h>
#include <sys/time.h>
int alt_clock_gettime (int clock_id, timespec *ts);
// TODO this is not required in this file, but condition_variable.hpp includes
// clock.hpp to get these definitions
#ifndef CLOCK_REALTIME
#define CLOCK_REALTIME 0
#endif
#ifndef HAVE_CLOCK_GETTIME
#define HAVE_CLOCK_GETTIME
#endif
#include <mach/clock.h>
#include <mach/mach.h>
#include <time.h>
#include <sys/time.h>
#endif
namespace zmq
......
......@@ -30,7 +30,6 @@
#ifndef __ZMQ_CONDITON_VARIABLE_HPP_INCLUDED__
#define __ZMQ_CONDITON_VARIABLE_HPP_INCLUDED__
#include "clock.hpp"
#include "err.hpp"
#include "mutex.hpp"
......
......@@ -37,7 +37,6 @@
#include "decoder_allocators.hpp"
#include "err.hpp"
#include "i_decoder.hpp"
#include "msg.hpp"
#include "stdint.hpp"
namespace zmq
......
......@@ -31,13 +31,12 @@
#define __ZMQ_DISH_HPP_INCLUDED__
#include <string>
#include <vector>
#include "socket_base.hpp"
#include "session_base.hpp"
#include "dist.hpp"
#include "fq.hpp"
#include "trie.hpp"
#include "msg.hpp"
namespace zmq
{
......
......@@ -33,7 +33,6 @@
#include <vector>
#include "array.hpp"
#include "pipe.hpp"
namespace zmq
{
......
......@@ -42,8 +42,8 @@
#include <algorithm>
#include "err.hpp"
#include "msg.hpp"
#include "i_encoder.hpp"
#include "msg.hpp"
namespace zmq
{
......
......@@ -32,11 +32,12 @@
#include "array.hpp"
#include "blob.hpp"
#include "pipe.hpp"
#include "msg.hpp"
namespace zmq
{
class msg_t;
class pipe_t;
// Class manages a set of inbound pipes. On receive it performs fair
// queueing so that senders gone berserk won't cause denial of
// service for decent senders.
......
......@@ -31,7 +31,6 @@
#define __ZMQ_GATHER_HPP_INCLUDED__
#include "socket_base.hpp"
#include "session_base.hpp"
#include "fq.hpp"
namespace zmq
......@@ -39,7 +38,6 @@ namespace zmq
class ctx_t;
class pipe_t;
class msg_t;
class io_thread_t;
class gather_t : public socket_base_t
{
......
......@@ -30,8 +30,6 @@
#ifndef __ZMQ_IO_THREAD_HPP_INCLUDED__
#define __ZMQ_IO_THREAD_HPP_INCLUDED__
#include <vector>
#include "stdint.hpp"
#include "object.hpp"
#include "poller.hpp"
......
......@@ -31,10 +31,12 @@
#define __ZMQ_LB_HPP_INCLUDED__
#include "array.hpp"
#include "pipe.hpp"
namespace zmq
{
class msg_t;
class pipe_t;
// This class manages a set of outbound pipes. On send it load balances
// messages fairly among the pipes.
......
......@@ -34,6 +34,8 @@
namespace zmq
{
class msg_t;
class mechanism_base_t : public mechanism_t
{
protected:
......
......@@ -15,6 +15,7 @@
namespace zmq
{
class io_thread_t;
class msg_t;
class session_base_t;
class norm_engine_t : public io_object_t, public i_engine
......
......@@ -36,7 +36,6 @@
#include "err.hpp"
#include "msg.hpp"
#include "session_base.hpp"
#include "wire.hpp"
#include "null_mechanism.hpp"
zmq::null_mechanism_t::null_mechanism_t (session_base_t *session_,
......
......@@ -29,6 +29,7 @@
#include "precompiled.hpp"
#include <string.h>
#include <set>
#include "options.hpp"
#include "err.hpp"
......
......@@ -32,7 +32,6 @@
#include <string>
#include <vector>
#include <set>
#include <map>
#include "atomic_ptr.hpp"
......@@ -41,6 +40,7 @@
#include "tcp_address.hpp"
#if defined ZMQ_HAVE_SO_PEERCRED || defined ZMQ_HAVE_LOCAL_PEERCRED
#include <set>
#include <sys/types.h>
#endif
#ifdef ZMQ_HAVE_LOCAL_PEERCRED
......
......@@ -31,7 +31,6 @@
#define __ZMQ_OWN_HPP_INCLUDED__
#include <set>
#include <algorithm>
#include "object.hpp"
#include "options.hpp"
......
......@@ -30,7 +30,6 @@
#ifndef __ZMQ_PIPE_HPP_INCLUDED__
#define __ZMQ_PIPE_HPP_INCLUDED__
#include "msg.hpp"
#include "ypipe_base.hpp"
#include "config.hpp"
#include "object.hpp"
......@@ -40,7 +39,7 @@
namespace zmq
{
class object_t;
class msg_t;
class pipe_t;
// Create a pipepair for bi-directional transfer of messages.
......
......@@ -30,7 +30,6 @@
#ifndef __ZMQ_PLAIN_SERVER_HPP_INCLUDED__
#define __ZMQ_PLAIN_SERVER_HPP_INCLUDED__
#include "mechanism.hpp"
#include "options.hpp"
#include "zap_client.hpp"
......
......@@ -33,6 +33,7 @@
#include "poller.hpp"
#include "proxy.hpp"
#include "likely.hpp"
#include "msg.hpp"
#if defined ZMQ_POLL_BASED_ON_POLL && !defined ZMQ_HAVE_WINDOWS \
&& !defined ZMQ_HAVE_AIX
......
......@@ -36,14 +36,12 @@
#include "socket_base.hpp"
#include "session_base.hpp"
#include "mtrie.hpp"
#include "array.hpp"
#include "dist.hpp"
#include "msg.hpp"
namespace zmq
{
class ctx_t;
class msg_t;
class pipe_t;
class io_thread_t;
......
......@@ -30,7 +30,6 @@
#ifndef __ZMQ_RAW_DECODER_HPP_INCLUDED__
#define __ZMQ_RAW_DECODER_HPP_INCLUDED__
#include "err.hpp"
#include "msg.hpp"
#include "i_decoder.hpp"
#include "stdint.hpp"
......
......@@ -30,8 +30,7 @@
#include "precompiled.hpp"
#include "encoder.hpp"
#include "raw_encoder.hpp"
#include "likely.hpp"
#include "wire.hpp"
#include "msg.hpp"
zmq::raw_encoder_t::raw_encoder_t (size_t bufsize_) :
encoder_base_t<raw_encoder_t> (bufsize_)
......
......@@ -33,11 +33,8 @@
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <algorithm>
#include "err.hpp"
#include "msg.hpp"
#include "i_encoder.hpp"
#include "encoder.hpp"
namespace zmq
{
......
......@@ -48,7 +48,6 @@
#include "ctx.hpp"
#include "fd.hpp"
#include "thread.hpp"
#include "poller_base.hpp"
namespace zmq
......
......@@ -36,12 +36,12 @@
#include "session_base.hpp"
#include "stdint.hpp"
#include "blob.hpp"
#include "msg.hpp"
#include "fq.hpp"
namespace zmq
{
class ctx_t;
class msg_t;
class pipe_t;
// TODO: This class uses O(n) scheduling. Rewrite it to use O(1) algorithm.
......
......@@ -30,7 +30,6 @@
#ifndef __ZMQ_SESSION_BASE_HPP_INCLUDED__
#define __ZMQ_SESSION_BASE_HPP_INCLUDED__
#include <string>
#include <stdarg.h>
#include "own.hpp"
......@@ -41,9 +40,7 @@
namespace zmq
{
class pipe_t;
class io_thread_t;
class socket_base_t;
struct i_engine;
struct address_t;
......
......@@ -39,10 +39,8 @@
#include "blob.hpp"
#include "stdint.hpp"
#include "poller.hpp"
#include "atomic_counter.hpp"
#include "i_poll_events.hpp"
#include "i_mailbox.hpp"
#include "stdint.hpp"
#include "clock.hpp"
#include "pipe.hpp"
......
......@@ -47,7 +47,6 @@
#endif
#include <vector>
#include <algorithm>
#include "socket_base.hpp"
#include "signaler.hpp"
......
......@@ -40,6 +40,7 @@
#include "options.hpp"
#include "socket_base.hpp"
#include "metadata.hpp"
#include "msg.hpp"
namespace zmq
{
......@@ -51,7 +52,6 @@ enum
};
class io_thread_t;
class msg_t;
class session_base_t;
class mechanism_t;
......
......@@ -35,6 +35,8 @@
#include <netinet/in.h>
#endif
#include <string>
#include "ip_resolver.hpp"
namespace zmq
......
......@@ -40,9 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
#endif
#include "udp_address.hpp"
#include "udp_engine.hpp"
#include "session_base.hpp"
#include "v2_protocol.hpp"
#include "err.hpp"
#include "ip.hpp"
......
......@@ -5,7 +5,6 @@
#include "io_object.hpp"
#include "i_engine.hpp"
#include "address.hpp"
#include "udp_address.hpp"
#include "msg.hpp"
#define MAX_UDP_MSG 8192
......
......@@ -30,7 +30,7 @@
#include "precompiled.hpp"
#include "encoder.hpp"
#include "v1_encoder.hpp"
#include "likely.hpp"
#include "msg.hpp"
#include "wire.hpp"
zmq::v1_encoder_t::v1_encoder_t (size_t bufsize_) :
......
......@@ -30,6 +30,7 @@
#include "precompiled.hpp"
#include "v2_protocol.hpp"
#include "v2_encoder.hpp"
#include "msg.hpp"
#include "likely.hpp"
#include "wire.hpp"
......
......@@ -31,12 +31,10 @@
#define __ZMQ_XPUB_HPP_INCLUDED__
#include <deque>
#include <string>
#include "socket_base.hpp"
#include "session_base.hpp"
#include "mtrie.hpp"
#include "array.hpp"
#include "dist.hpp"
namespace zmq
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment