General: Include headers directly where necessary

Ensures includes are explicitly included where necessary to avoid
indirect inclusions.
This commit is contained in:
Lioncash 2019-08-30 03:52:22 -04:00
parent df1e450728
commit 5935e84dab
18 changed files with 101 additions and 49 deletions

View File

@ -1,7 +1,14 @@
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include "logvisor/logvisor.hpp"
#include "nod/nod.hpp"
#include <logvisor/logvisor.hpp>
#include <nod/DiscBase.hpp>
#include <nod/DiscGCN.hpp>
#include <nod/DiscWii.hpp>
#include <nod/nod.hpp>
static void printHelp() {
fmt::print(stderr, fmt(

View File

@ -1,6 +1,11 @@
#pragma once
#include "Util.hpp"
#include <algorithm>
#include <cctype>
#include <cstddef>
#include <vector>
#include "nod/Util.hpp"
namespace nod {

View File

@ -1,15 +1,17 @@
#pragma once
#include <vector>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <functional>
#include <memory>
#include <string>
#include <unordered_map>
#include <cstdio>
#include <cstdint>
#include <functional>
#include "Util.hpp"
#include "IDiscIO.hpp"
#include "IFileIO.hpp"
#include <vector>
#include "nod/IDiscIO.hpp"
#include "nod/IFileIO.hpp"
#include "nod/Util.hpp"
namespace nod {

View File

@ -1,6 +1,6 @@
#pragma once
#include "DiscBase.hpp"
#include "nod/DiscBase.hpp"
namespace nod {
class DiscBuilderGCN;

View File

@ -1,6 +1,6 @@
#pragma once
#include "DiscBase.hpp"
#include "nod/DiscBase.hpp"
namespace nod {
class DiscBuilderWii;

View File

@ -1,9 +1,8 @@
#pragma once
#include <memory>
#include <cstdlib>
#include <cstdio>
#include <cstdint>
#include <cstdio>
#include <memory>
#if NOD_ATHENA
#include <athena/IStreamReader.hpp>

View File

@ -1,10 +1,13 @@
#pragma once
#include <memory>
#include <cstdint>
#include <functional>
#include <cstdlib>
#include "IDiscIO.hpp"
#include "Util.hpp"
#include <memory>
#include "nod/IDiscIO.hpp"
#include "nod/Util.hpp"
#include <logvisor/logvisor.hpp>
namespace nod {

View File

@ -29,7 +29,7 @@
#include <cstring>
#include <string>
#include <string_view>
#include "logvisor/logvisor.hpp"
#include <logvisor/logvisor.hpp>
#ifdef _MSC_VER
#pragma warning(disable : 4996)

View File

@ -1,9 +1,10 @@
#pragma once
#include <memory>
#include <functional>
#include "logvisor/logvisor.hpp"
#include "Util.hpp"
#include <memory>
#include <string>
#include "nod/Util.hpp"
namespace nod {
@ -18,7 +19,3 @@ std::unique_ptr<DiscBase> OpenDiscFromImage(SystemStringView path);
std::unique_ptr<DiscBase> OpenDiscFromImage(SystemStringView path, bool& isWii);
} // namespace nod
#include "DiscGCN.hpp"
#include "DiscWii.hpp"
#include "IDiscIO.hpp"

View File

@ -1,3 +1,5 @@
#include "nod/DirectoryEnumerator.hpp"
#ifdef _WIN32
#include <windows.h>
#else
@ -5,10 +7,9 @@
#include <dirent.h>
#endif
#include <cstring>
#include <map>
#include "nod/DirectoryEnumerator.hpp"
namespace nod {
DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode, bool sizeSort, bool reverse, bool noHidden) {

View File

@ -1,14 +1,22 @@
#include "nod/DiscBase.hpp"
#include "nod/IFileIO.hpp"
#include "nod/DirectoryEnumerator.hpp"
#include "nod/nod.hpp"
#include <cstdio>
#include <cerrno>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <unordered_map>
#include "nod/DirectoryEnumerator.hpp"
#include "nod/IFileIO.hpp"
#include "nod/nod.hpp"
#include "nod/Util.hpp"
#ifndef _WIN32
#include <unistd.h>
#else
#include <logvisor/logvisor.hpp>
static void* memmem(const void* haystack, size_t hlen, const void* needle, size_t nlen) {
int needle_first;
const uint8_t* p = static_cast<const uint8_t*>(haystack);

View File

@ -1,6 +1,16 @@
#include "nod/DiscGCN.hpp"
#include "nod/nod.hpp"
#include <cinttypes>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include "nod/nod.hpp"
#include "nod/Util.hpp"
#include <logvisor/logvisor.hpp>
#define BUFFER_SZ 0x8000
namespace nod {

View File

@ -1,7 +1,6 @@
#include <cstdio>
#include "nod/Util.hpp"
#include "nod/IDiscIO.hpp"
#include "nod/IFileIO.hpp"
#include "nod/Util.hpp"
namespace nod {

View File

@ -1,8 +1,13 @@
#include <cstdio>
#include <cinttypes>
#include "nod/Util.hpp"
#include <cstdint>
#include <cstring>
#include <memory>
#include "nod/IDiscIO.hpp"
#include "nod/IFileIO.hpp"
#include "nod/Util.hpp"
#include <logvisor/logvisor.hpp>
namespace nod {

View File

@ -1,11 +1,15 @@
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cinttypes>
#include "nod/DiscWii.hpp"
#include <cinttypes>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "nod/aes.hpp"
#include "nod/sha1.h"
#include "nod/nod.hpp"
#include "nod/sha1.h"
#include "nod/Util.hpp"
namespace nod {

View File

@ -1,8 +1,12 @@
#include <cstdio>
#include <cstdlib>
#include <cinttypes>
#include "nod/Util.hpp"
#include <cstdio>
#include <cstdint>
#include <cstdlib>
#include "nod/IFileIO.hpp"
#include "nod/Util.hpp"
#include <logvisor/logvisor.hpp>
namespace nod {

View File

@ -1,8 +1,12 @@
#include <cinttypes>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cinttypes>
#include "nod/Util.hpp"
#include "nod/IFileIO.hpp"
#include "nod/Util.hpp"
#include <logvisor/logvisor.hpp>
namespace nod {

View File

@ -1,6 +1,10 @@
#include <cstdio>
#include "nod/nod.hpp"
#include <cstdio>
#include "nod/DiscBase.hpp"
#include "nod/DiscGCN.hpp"
#include "nod/DiscWii.hpp"
namespace nod {