From 3b0139b258493969c2d8cf32333c757e8afe0ee3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 11 May 2018 09:16:30 -0400 Subject: [PATCH] SDCardUtil: Namespace SDCardUtil Brings yet another header in the common library under the Common namespace. --- Source/Core/Common/SDCardUtil.cpp | 3 +++ Source/Core/Common/SDCardUtil.h | 3 +++ Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/SDCardUtil.cpp b/Source/Core/Common/SDCardUtil.cpp index 8a06a118d9..74ac71f08e 100644 --- a/Source/Core/Common/SDCardUtil.cpp +++ b/Source/Core/Common/SDCardUtil.cpp @@ -56,6 +56,8 @@ #pragma warning(disable : 4310) #endif +namespace Common +{ /* Believe me, you *don't* want to change these constants !! */ #define BYTES_PER_SECTOR 512 #define RESERVED_SECTORS 32 @@ -286,6 +288,7 @@ FailWrite: ERROR_LOG(COMMON, "unlink(%s) failed: %s", filename.c_str(), LastStrerrorString().c_str()); return false; } +} // namespace Common #ifdef _MSC_VER #pragma warning(pop) diff --git a/Source/Core/Common/SDCardUtil.h b/Source/Core/Common/SDCardUtil.h index 64670aa9a9..d35e239df2 100644 --- a/Source/Core/Common/SDCardUtil.h +++ b/Source/Core/Common/SDCardUtil.h @@ -7,4 +7,7 @@ #include #include "Common/CommonTypes.h" +namespace Common +{ bool SDCardCreate(u64 disk_size /*in MB*/, const std::string& filename); +} // namespace Common diff --git a/Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp b/Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp index 036457bacb..acf891deb9 100644 --- a/Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp +++ b/Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp @@ -67,7 +67,7 @@ void SDIOSlot0::OpenInternal() if (!m_card) { WARN_LOG(IOS_SD, "Failed to open SD Card image, trying to create a new 128MB image..."); - if (SDCardCreate(128, filename)) + if (Common::SDCardCreate(128, filename)) { INFO_LOG(IOS_SD, "Successfully created %s", filename.c_str()); m_card.Open(filename, "r+b");