From d3614be2e07baa6c1d7cebbab5e260481fbb2de9 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 1 Feb 2012 12:46:44 +0000 Subject: Removed a few duplicate includes git-svn-id: http://mc-server.googlecode.com/svn/trunk@215 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cAuthenticator.cpp | 11 ++++++++--- source/cBlockingTCPLink.cpp | 9 ++++----- source/cChunk.cpp | 3 +-- source/cChunkLoader.cpp | 8 -------- source/cChunkMap.cpp | 2 -- source/cRecipeChecker.cpp | 3 +-- source/cRoot.cpp | 8 +++----- source/cTCPLink.cpp | 6 +++--- source/md5/md5.cpp | 6 +----- source/packets/cPacket.h | 13 +++++++------ 10 files changed, 28 insertions(+), 41 deletions(-) diff --git a/source/cAuthenticator.cpp b/source/cAuthenticator.cpp index 168ace7b5..83b2695a4 100644 --- a/source/cAuthenticator.cpp +++ b/source/cAuthenticator.cpp @@ -5,14 +5,19 @@ #include "cBlockingTCPLink.h" #include "../iniFile/iniFile.h" -#ifndef _WIN32 -#include -#endif #include + + + + extern void ReplaceString( std::string & a_HayStack, const std::string & a_Needle, const std::string & a_ReplaceWith ); + + + + cAuthenticator::cAuthenticator() { } diff --git a/source/cBlockingTCPLink.cpp b/source/cBlockingTCPLink.cpp index 19026321e..d436a52cf 100644 --- a/source/cBlockingTCPLink.cpp +++ b/source/cBlockingTCPLink.cpp @@ -5,11 +5,6 @@ #include "packets/cPacket.h" #include "MCSocket.h" -#ifndef _WIN32 - #include - #include -#endif - #ifdef _WIN32 #define MSG_NOSIGNAL (0) #endif @@ -17,6 +12,10 @@ #define MSG_NOSIGNAL (0) #endif + + + + cBlockingTCPLink::cBlockingTCPLink() : m_Socket( 0 ) { diff --git a/source/cChunk.cpp b/source/cChunk.cpp index abe1d0443..992a4e71a 100644 --- a/source/cChunk.cpp +++ b/source/cChunk.cpp @@ -2,8 +2,7 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #ifndef _WIN32 -#include -#include + #include #endif diff --git a/source/cChunkLoader.cpp b/source/cChunkLoader.cpp index e5220575c..94ce6153d 100644 --- a/source/cChunkLoader.cpp +++ b/source/cChunkLoader.cpp @@ -17,17 +17,9 @@ #include #ifndef _WIN32 -#include #include -#include -#include // for mkdir -#include -#else -#include #endif -#include - struct ChunkData { ChunkData() diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp index 4e9fd5c62..8e2257858 100644 --- a/source/cChunkMap.cpp +++ b/source/cChunkMap.cpp @@ -9,9 +9,7 @@ #include // floorf #ifndef _WIN32 - #include // memcpy #include // abs - #include // auto_ptr #endif #include "zlib.h" diff --git a/source/cRecipeChecker.cpp b/source/cRecipeChecker.cpp index ac90c7a00..7db1f9643 100644 --- a/source/cRecipeChecker.cpp +++ b/source/cRecipeChecker.cpp @@ -7,8 +7,7 @@ #include #ifndef _WIN32 -#include -#include + #include #endif #include "Defines.h" diff --git a/source/cRoot.cpp b/source/cRoot.cpp index 4f6dec035..73f5a6397 100644 --- a/source/cRoot.cpp +++ b/source/cRoot.cpp @@ -17,12 +17,10 @@ #include "../iniFile/iniFile.h" #include -#include -#include -#ifndef _WIN32 -#include -#endif + + + cRoot* cRoot::s_Root = 0; diff --git a/source/cTCPLink.cpp b/source/cTCPLink.cpp index 65cb0c028..19f04f4ee 100644 --- a/source/cTCPLink.cpp +++ b/source/cTCPLink.cpp @@ -5,9 +5,9 @@ #include "cSocket.h" #include "MCSocket.h" -#ifndef _WIN32 - #include -#endif + + + #ifdef _WIN32 #define MSG_NOSIGNAL (0) diff --git a/source/md5/md5.cpp b/source/md5/md5.cpp index 534020219..2b9e10c9f 100644 --- a/source/md5/md5.cpp +++ b/source/md5/md5.cpp @@ -35,12 +35,8 @@ documentation and/or software. /* interface header */ #include "md5.h" -/* system implementation headers */ -#include -#ifndef _WIN32 -#include -#endif + // Constants for MD5Transform routine. diff --git a/source/packets/cPacket.h b/source/packets/cPacket.h index 3d6f812a9..7d85afc97 100644 --- a/source/packets/cPacket.h +++ b/source/packets/cPacket.h @@ -3,12 +3,9 @@ #include "../cSocket.h" #include "../PacketID.h" -#ifdef _WIN32 - // #include -#else - #include // Silly Linux doesn't have xstring... - #include -#endif + + + class cSocket; class cPacket @@ -55,3 +52,7 @@ public: static int SendData( cSocket & a_Socket, const char* a_Message, unsigned int a_Size, int a_Options ); static int RecvAll( cSocket & a_Socket, char* a_Data, unsigned int a_Size, int a_Options ); }; + + + + -- cgit v1.2.3