Clean up includes in DiscIO as much as possible.
Also turned a long iterator declaration in VolumeDirectory.cpp to using auto in order to shorten it.
This commit is contained in:
parent
82fd579506
commit
207547b425
|
@ -2,14 +2,13 @@
|
||||||
// Licensed under GPLv2
|
// Licensed under GPLv2
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "FileUtil.h"
|
|
||||||
#include "CDUtils.h"
|
|
||||||
#include "Blob.h"
|
#include "Blob.h"
|
||||||
#include "CompressedBlob.h"
|
#include "CDUtils.h"
|
||||||
#include "FileBlob.h"
|
|
||||||
#include "CISOBlob.h"
|
#include "CISOBlob.h"
|
||||||
|
#include "CompressedBlob.h"
|
||||||
#include "DriveBlob.h"
|
#include "DriveBlob.h"
|
||||||
|
#include "FileBlob.h"
|
||||||
|
#include "FileUtil.h"
|
||||||
#include "WbfsBlob.h"
|
#include "WbfsBlob.h"
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// detect whether the file is a compressed blob, or just a big hunk of data, or a drive, and
|
// detect whether the file is a compressed blob, or just a big hunk of data, or a drive, and
|
||||||
// automatically do the right thing.
|
// automatically do the right thing.
|
||||||
|
|
||||||
#include "Common.h"
|
#include "CommonTypes.h"
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "CompressedBlob.h"
|
#include "CompressedBlob.h"
|
||||||
#include "DiscScrubber.h"
|
#include "DiscScrubber.h"
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace DiscIO
|
||||||
namespace DiscScrubber
|
namespace DiscScrubber
|
||||||
{
|
{
|
||||||
|
|
||||||
#define CLUSTER_SIZE 0x8000
|
#define CLUSTER_SIZE 0x8000
|
||||||
|
|
||||||
u8* m_FreeTable = NULL;
|
u8* m_FreeTable = NULL;
|
||||||
u64 m_FileSize;
|
u64 m_FileSize;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#ifndef DISC_SCRUBBER_H
|
#ifndef DISC_SCRUBBER_H
|
||||||
#define DISC_SCRUBBER_H
|
#define DISC_SCRUBBER_H
|
||||||
|
|
||||||
#include "Common.h"
|
#include "CommonTypes.h"
|
||||||
#include "Blob.h"
|
#include "Blob.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ DriveReader::DriveReader(const char *drive)
|
||||||
// removal while reading from it.
|
// removal while reading from it.
|
||||||
pmrLockCDROM.PreventMediaRemoval = TRUE;
|
pmrLockCDROM.PreventMediaRemoval = TRUE;
|
||||||
DeviceIoControl(hDisc, IOCTL_CDROM_MEDIA_REMOVAL,
|
DeviceIoControl(hDisc, IOCTL_CDROM_MEDIA_REMOVAL,
|
||||||
&pmrLockCDROM, sizeof(pmrLockCDROM), NULL,
|
&pmrLockCDROM, sizeof(pmrLockCDROM), NULL,
|
||||||
0, &dwNotUsed, NULL);
|
0, &dwNotUsed, NULL);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
SectorReader::SetSectorSize(2048);
|
SectorReader::SetSectorSize(2048);
|
||||||
|
@ -67,7 +67,7 @@ DriveReader::~DriveReader()
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
file_.Close();
|
file_.Close();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DriveReader *DriveReader::Create(const char *drive)
|
DriveReader *DriveReader::Create(const char *drive)
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
// Licensed under GPLv2
|
// Licensed under GPLv2
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
|
|
||||||
#include "FileHandlerARC.h"
|
#include "FileHandlerARC.h"
|
||||||
#include "StringUtil.h"
|
#include "StringUtil.h"
|
||||||
#include "Blob.h"
|
#include "Blob.h"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "Common.h"
|
#include "CommonTypes.h"
|
||||||
#include "Filesystem.h"
|
#include "Filesystem.h"
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
|
|
|
@ -2,11 +2,10 @@
|
||||||
// Licensed under GPLv2
|
// Licensed under GPLv2
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "MathUtil.h"
|
|
||||||
#include "CommonPaths.h"
|
#include "CommonPaths.h"
|
||||||
#include "VolumeDirectory.h"
|
|
||||||
#include "FileBlob.h"
|
#include "FileBlob.h"
|
||||||
|
#include "MathUtil.h"
|
||||||
|
#include "VolumeDirectory.h"
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
|
@ -484,8 +483,7 @@ static u32 ComputeNameSize(const File::FSTEntry& parentEntry)
|
||||||
{
|
{
|
||||||
u32 nameSize = 0;
|
u32 nameSize = 0;
|
||||||
const std::vector<File::FSTEntry>& children = parentEntry.children;
|
const std::vector<File::FSTEntry>& children = parentEntry.children;
|
||||||
for (std::vector<File::FSTEntry>::const_iterator it = children.begin();
|
for (auto it = children.cbegin(); it != children.cend(); ++it)
|
||||||
it != children.end(); ++it)
|
|
||||||
{
|
{
|
||||||
const File::FSTEntry& entry = *it;
|
const File::FSTEntry& entry = *it;
|
||||||
if (entry.isDirectory)
|
if (entry.isDirectory)
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
#ifndef _VOLUME_DIRECTORY
|
#ifndef _VOLUME_DIRECTORY
|
||||||
#define _VOLUME_DIRECTORY
|
#define _VOLUME_DIRECTORY
|
||||||
|
|
||||||
#include "Volume.h"
|
|
||||||
#include "Common.h"
|
|
||||||
#include "FileUtil.h"
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "FileUtil.h"
|
||||||
|
#include "Volume.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// --- this volume type is used for reading files directly from the hard drive ---
|
// --- this volume type is used for reading files directly from the hard drive ---
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
// Licensed under GPLv2
|
// Licensed under GPLv2
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
|
|
||||||
#include "VolumeGC.h"
|
#include "VolumeGC.h"
|
||||||
#include "StringUtil.h"
|
#include "StringUtil.h"
|
||||||
#include "FileMonitor.h"
|
#include "FileMonitor.h"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "Common.h"
|
#include "CommonTypes.h"
|
||||||
#include "Blob.h"
|
#include "Blob.h"
|
||||||
#include "Volume.h"
|
#include "Volume.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue