General: Include headers that are necessary

Removes unused headers and ensures that all necessary headers are
included. In particular, this removes quite a few <iostream> includes,
which removes quite a few static constructors.
This commit is contained in:
Lioncash
2019-08-26 07:06:18 -04:00
parent d1d1850cb7
commit 9c50a60c2b
32 changed files with 125 additions and 88 deletions

View File

@@ -1,7 +1,4 @@
#include "athena/Checksums.hpp"
#include "athena/FileReader.hpp"
#include <iostream>
#include <iomanip>
namespace athena::checksums {
atUint64 crc64(const atUint8* data, atUint64 length, atUint64 seed, atUint64 final) {

View File

@@ -1,8 +1,9 @@
#include "athena/Compression.hpp"
#if AT_LZOKAY
#include <lzokay.hpp>
#endif
#include <iostream>
#include <zlib.h>
#include "LZ77/LZType10.hpp"
#include "LZ77/LZType11.hpp"

View File

@@ -1,5 +1,10 @@
#include "athena/DNAYaml.hpp"
#include <cctype>
#include <cstdlib>
#include "athena/YAMLCommon.hpp"
namespace athena::io {
template <>

View File

@@ -1,10 +1,14 @@
#include "athena/Dir.hpp"
#include <sys/stat.h>
#include <climits>
#include <cstdlib>
#include <ctime>
#include <sys/stat.h>
#define __STDC_FORMAT_MACROS
#include <cinttypes>
#include "athena/FileInfo.hpp"
#include "athena/Utility.hpp"
#ifndef _WIN32

View File

@@ -1,11 +1,13 @@
#include "athena/FileInfo.hpp"
#include "athena/Utility.hpp"
#include "athena/FileWriter.hpp"
#include "athena/FileReader.hpp"
#include <ctime>
#include <climits>
#include <cstdio>
#include <limits.h>
#include <cstdlib>
#include <ctime>
#include "athena/FileReader.hpp"
#include "athena/FileWriter.hpp"
#include "athena/Utility.hpp"
#ifndef _WIN32
#include <sys/time.h>

View File

@@ -1,5 +1,7 @@
#include "athena/FileWriter.hpp"
#include <cstring>
namespace athena::io {
void TransactionalFileWriter::seek(atInt64 pos, SeekOrigin origin) {
switch (origin) {

View File

@@ -1,11 +1,8 @@
#include "athena/MemoryReader.hpp"
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <cstring>
#ifdef HW_RVL
#include <malloc.h>

View File

@@ -2,8 +2,6 @@
#include <cstdio>
#include <cstring>
#include <vector>
#include <iostream>
#ifdef HW_RVL
#include <malloc.h>

View File

@@ -1,18 +1,21 @@
#include "athena/Socket.hpp"
#ifndef _WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <cerrno>
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <unistd.h>
#include <cerrno>
#else
#include <WinSock2.h>
#include <Ws2tcpip.h>
#endif
#include "athena/Global.hpp"
namespace athena::net {
/* Define the low-level send/receive flags, which depend on the OS */

View File

@@ -1,15 +1,16 @@
#include "athena/Utility.hpp"
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <sstream>
#include <algorithm>
#include <cstdarg>
#include <iterator>
#include <cstdio>
#include <sys/types.h>
#include <sys/stat.h>
#include <cstdlib>
#include <cstring>
#include <iterator>
#include <random>
#include <sstream>
#include <sys/stat.h>
#include <sys/types.h>
#include "utf8proc.h"
#ifdef _MSC_VER

View File

@@ -1,10 +1,8 @@
#include "athena/VectorWriter.hpp"
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
#include <iostream>
#include <algorithm>
namespace athena::io {