Merge pull request #5 from lioncash/include

General: Avoid indirect includes
This commit is contained in:
Phillip Stephens 2019-08-30 16:28:15 -07:00 committed by GitHub
commit 9d003a3e9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 60 additions and 33 deletions

View File

@ -8,9 +8,11 @@ using SizeReturn = ssize_t;
using SizeReturn = DWORD;
#endif
#include "Util.hpp"
#include <cstddef>
#include <vector>
#include "kabufuda/Util.hpp"
namespace kabufuda {
class AsyncIO {

View File

@ -1,6 +1,7 @@
#pragma once
#include "Constants.hpp"
#include <cstdint>
#include "kabufuda/Constants.hpp"
namespace kabufuda {
class BlockAllocationTable {

View File

@ -1,14 +1,13 @@
#pragma once
#include "BlockAllocationTable.hpp"
#include "Directory.hpp"
#include "File.hpp"
#include "Util.hpp"
#include "AsyncIO.hpp"
#include <cstdint>
#include <string>
#include <vector>
#include <memory>
#include "kabufuda/AsyncIO.hpp"
#include "kabufuda/BlockAllocationTable.hpp"
#include "kabufuda/Directory.hpp"
#include "kabufuda/File.hpp"
#include "kabufuda/Util.hpp"
#define CARD_FILENAME_MAX 32
#define CARD_ICON_MAX 8

View File

@ -1,14 +1,14 @@
#pragma once
#include <stdint.h>
#include "Util.hpp"
#include <cstdint>
#include "kabufuda/Util.hpp"
namespace kabufuda {
uint32_t constexpr BlockSize = 0x2000;
uint32_t constexpr MaxFiles = 127;
uint32_t constexpr FSTBlocks = 5;
uint32_t constexpr MbitToBlocks = 0x10;
uint32_t constexpr BATSize = 0xFFB;
constexpr uint32_t BlockSize = 0x2000;
constexpr uint32_t MaxFiles = 127;
constexpr uint32_t FSTBlocks = 5;
constexpr uint32_t MbitToBlocks = 0x10;
constexpr uint32_t BATSize = 0xFFB;
/**
* @brief The EPermissions enum

View File

@ -1,6 +1,7 @@
#pragma once
#include "File.hpp"
#include <cstdint>
#include "kabufuda/File.hpp"
namespace kabufuda {
class Directory {

View File

@ -1,6 +1,7 @@
#pragma once
#include "Constants.hpp"
#include <cstdint>
#include "kabufuda/Constants.hpp"
namespace kabufuda {
class File {

View File

@ -1,6 +1,6 @@
#pragma once
#include <stdint.h>
#include <cstdint>
// Modified code taken from libogc

View File

@ -1,15 +1,16 @@
#pragma once
#ifndef _WIN32
#include <cerrno>
#include <cstdlib>
#include <sys/stat.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/statvfs.h>
#include <cerrno>
#else
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
@ -25,13 +26,12 @@
#endif
#endif
#include <cstdarg>
#include <cstdint>
#include <cstdio>
#include <algorithm>
#include <cstdint>
#include <string>
#include <cstring>
#include "WideStringConvert.hpp"
#include <type_traits>
#include "kabufuda/WideStringConvert.hpp"
#undef bswap16
#undef bswap32

View File

@ -1,5 +1,9 @@
#include "kabufuda/AsyncIO.hpp"
#include <algorithm>
#include <cstdio>
#include <cstring>
namespace kabufuda {
AsyncIO::AsyncIO(SystemStringView filename, bool truncate) {

View File

@ -1,5 +1,8 @@
#include "kabufuda/AsyncIO.hpp"
#include <algorithm>
#include <cstdio>
namespace kabufuda {
#undef min

View File

@ -1,7 +1,12 @@
#include "kabufuda/BlockAllocationTable.hpp"
#include "kabufuda/Util.hpp"
#include <algorithm>
#include <cstddef>
#include <cstring>
#include <vector>
#include "kabufuda/Util.hpp"
namespace kabufuda {
void BlockAllocationTable::swapEndian() {
m_checksum = SBig(m_checksum);

View File

@ -1,10 +1,12 @@
#include "kabufuda/Card.hpp"
#include "kabufuda/SRAM.hpp"
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <memory>
#include "kabufuda/SRAM.hpp"
namespace kabufuda {
#define ROUND_UP_8192(val) (((val) + 8191) & ~8191)

View File

@ -1,7 +1,10 @@
#include "kabufuda/Directory.hpp"
#include "kabufuda/Util.hpp"
#include <algorithm>
#include <cstring>
#include "kabufuda/Util.hpp"
namespace kabufuda {
void Directory::swapEndian() {
std::for_each(std::begin(m_files), std::end(m_files), [](File& f) { f.swapEndian(); });

View File

@ -1,4 +1,7 @@
#include "kabufuda/File.hpp"
#include <cstring>
#include "kabufuda/Util.hpp"
namespace kabufuda {

View File

@ -1,5 +1,8 @@
#include "kabufuda/WideStringConvert.hpp"
#include "utf8proc.h"
#include <cstdio>
#include <utf8proc.h>
namespace kabufuda {
std::string WideToUTF8(std::wstring_view src) {