inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 5b152cfcd993119c0d0ef87b73b3b0f20c940cdc
parent d2ffdfc2ce33259ea8bfa225cbd44b2ea336b6e7
Author: Peter Powell <petpow@saberuk.com>
Date:   Thu, 20 Jun 2019 10:24:16 +0100

Deduplicate dirent.h inclusion.

Diffstat:
Minclude/fileutils.h | 4----
Msrc/fileutils.cpp | 4++++
Msrc/inspircd.cpp | 1-
Msrc/modules.cpp | 4----
4 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/include/fileutils.h b/include/fileutils.h @@ -19,10 +19,6 @@ #pragma once -#ifndef _WIN32 -# include <dirent.h> -#endif - /** Provides an easy method of reading a text file into memory. */ class CoreExport FileReader { diff --git a/src/fileutils.cpp b/src/fileutils.cpp @@ -21,6 +21,10 @@ #include <fstream> +#ifndef _WIN32 +# include <dirent.h> +#endif + FileReader::FileReader(const std::string& filename) { Load(filename); diff --git a/src/inspircd.cpp b/src/inspircd.cpp @@ -30,7 +30,6 @@ #include <signal.h> #ifndef _WIN32 - #include <dirent.h> #include <unistd.h> #include <sys/resource.h> #include <dlfcn.h> diff --git a/src/modules.cpp b/src/modules.cpp @@ -28,10 +28,6 @@ #include "exitcodes.h" #include <iostream> -#ifndef _WIN32 - #include <dirent.h> -#endif - static insp::intrusive_list<dynamic_reference_base>* dynrefs = NULL; void dynamic_reference_base::reset_all()