diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-03-03 14:43:52 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-03-03 17:18:18 -0500 |
| commit | 552c0d8404ebd1e0cfa71c2d14ecb81c40f4cd70 (patch) | |
| tree | e74c2a99f4114cd11837361118a436945a963825 /Source/Core/DiscIO | |
| parent | 51e932b4ec24b0225a80c66a39c906f6e95f7519 (diff) | |
Common: Move byte swapping utilities into their own header
This moves all the byte swapping utilities into a header named Swap.h.
A dedicated header is much more preferable here due to the size of the
code itself. In general usage throughout the codebase, CommonFuncs.h was
generally only included for these functions anyway. These being in their
own header avoids dumping the lesser used utilities into scope. As well
as providing a localized area for more utilities related to byte
swapping in the future (should they be needed). This also makes it nicer
to identify which files depend on the byte swapping utilities in
particular.
Since this is a completely new header, moving the code uncovered a few
indirect includes, as well as making some other inclusions unnecessary.
Diffstat (limited to 'Source/Core/DiscIO')
| -rw-r--r-- | Source/Core/DiscIO/Blob.h | 3 | ||||
| -rw-r--r-- | Source/Core/DiscIO/NANDContentLoader.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/DiscIO/TGCBlob.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/DiscIO/Volume.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/DiscIO/Volume.h | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/VolumeWiiCrypted.cpp | 7 | ||||
| -rw-r--r-- | Source/Core/DiscIO/WbfsBlob.cpp | 6 |
7 files changed, 20 insertions, 15 deletions
diff --git a/Source/Core/DiscIO/Blob.h b/Source/Core/DiscIO/Blob.h index 7f954cd65b..cf04789b01 100644 --- a/Source/Core/DiscIO/Blob.h +++ b/Source/Core/DiscIO/Blob.h @@ -17,8 +17,9 @@ #include <array> #include <memory> #include <string> -#include "Common/CommonFuncs.h" + #include "Common/CommonTypes.h" +#include "Common/Swap.h" namespace DiscIO { diff --git a/Source/Core/DiscIO/NANDContentLoader.cpp b/Source/Core/DiscIO/NANDContentLoader.cpp index 914e23191e..398e085626 100644 --- a/Source/Core/DiscIO/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/NANDContentLoader.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "DiscIO/NANDContentLoader.h" + #include <algorithm> #include <array> #include <cinttypes> @@ -15,7 +17,6 @@ #include <vector> #include "Common/Align.h" -#include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" #include "Common/Crypto/AES.h" #include "Common/FileUtil.h" @@ -23,9 +24,8 @@ #include "Common/MsgHandler.h" #include "Common/NandPaths.h" #include "Common/StringUtil.h" +#include "Common/Swap.h" -#include "DiscIO/Enums.h" -#include "DiscIO/NANDContentLoader.h" #include "DiscIO/WiiWad.h" namespace DiscIO diff --git a/Source/Core/DiscIO/TGCBlob.cpp b/Source/Core/DiscIO/TGCBlob.cpp index 886bbb6a78..a3db368133 100644 --- a/Source/Core/DiscIO/TGCBlob.cpp +++ b/Source/Core/DiscIO/TGCBlob.cpp @@ -2,13 +2,14 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "DiscIO/TGCBlob.h" + #include <memory> #include <string> #include <utility> -#include "Common/CommonFuncs.h" #include "Common/FileUtil.h" -#include "DiscIO/TGCBlob.h" +#include "Common/Swap.h" namespace { diff --git a/Source/Core/DiscIO/Volume.cpp b/Source/Core/DiscIO/Volume.cpp index 0209bc0f57..640b709ffe 100644 --- a/Source/Core/DiscIO/Volume.cpp +++ b/Source/Core/DiscIO/Volume.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "DiscIO/Volume.h" + #include <algorithm> #include <map> #include <string> @@ -9,12 +11,12 @@ #include <vector> #include "Common/ColorUtil.h" -#include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" #include "Common/FileUtil.h" #include "Common/StringUtil.h" +#include "Common/Swap.h" + #include "DiscIO/Enums.h" -#include "DiscIO/Volume.h" namespace DiscIO { diff --git a/Source/Core/DiscIO/Volume.h b/Source/Core/DiscIO/Volume.h index f3f530e5e4..cd48249ccb 100644 --- a/Source/Core/DiscIO/Volume.h +++ b/Source/Core/DiscIO/Volume.h @@ -9,9 +9,9 @@ #include <string> #include <vector> -#include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" #include "Common/StringUtil.h" +#include "Common/Swap.h" #include "Core/IOS/ES/Formats.h" #include "DiscIO/Enums.h" diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp index 71e50252db..ad9cd917d5 100644 --- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp +++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "DiscIO/VolumeWiiCrypted.h" + #include <cstddef> #include <cstring> #include <map> @@ -12,18 +14,17 @@ #include <utility> #include <vector> -#include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" #include "Common/Logging/Log.h" #include "Common/MsgHandler.h" +#include "Common/Swap.h" + #include "DiscIO/Blob.h" #include "DiscIO/Enums.h" #include "DiscIO/FileMonitor.h" #include "DiscIO/Filesystem.h" #include "DiscIO/Volume.h" #include "DiscIO/VolumeCreator.h" -#include "DiscIO/VolumeGC.h" -#include "DiscIO/VolumeWiiCrypted.h" namespace DiscIO { diff --git a/Source/Core/DiscIO/WbfsBlob.cpp b/Source/Core/DiscIO/WbfsBlob.cpp index 0d249d72eb..7234978df0 100644 --- a/Source/Core/DiscIO/WbfsBlob.cpp +++ b/Source/Core/DiscIO/WbfsBlob.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "DiscIO/WbfsBlob.h" + #include <algorithm> #include <cstdio> #include <cstring> @@ -12,12 +14,10 @@ #include "Common/Align.h" #include "Common/Assert.h" -#include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" #include "Common/FileUtil.h" -#include "Common/Logging/Log.h" #include "Common/MsgHandler.h" -#include "DiscIO/WbfsBlob.h" +#include "Common/Swap.h" namespace DiscIO { |
