summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/FileBlob.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2016-06-24 10:43:46 +0200
committerPierre Bourdon <delroth@gmail.com>2016-06-24 10:43:46 +0200
commit3570c7f03a2aa90aa634f96c0af1969af610f14d (patch)
tree4252e03c0e853ba7cffe022937698c854ad0eaa9 /Source/Core/DiscIO/FileBlob.cpp
parent2115e8a4a6814e32107b5205ff5c95bbd3c6e99c (diff)
Reformat all the things. Have fun with merge conflicts.
Diffstat (limited to 'Source/Core/DiscIO/FileBlob.cpp')
-rw-r--r--Source/Core/DiscIO/FileBlob.cpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/Source/Core/DiscIO/FileBlob.cpp b/Source/Core/DiscIO/FileBlob.cpp
index 79b66b37bc..7d1dabe198 100644
--- a/Source/Core/DiscIO/FileBlob.cpp
+++ b/Source/Core/DiscIO/FileBlob.cpp
@@ -2,39 +2,37 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "DiscIO/FileBlob.h"
#include <memory>
#include <string>
-#include "DiscIO/FileBlob.h"
namespace DiscIO
{
-
-PlainFileReader::PlainFileReader(std::FILE* file)
- : m_file(file)
+PlainFileReader::PlainFileReader(std::FILE* file) : m_file(file)
{
- m_size = m_file.GetSize();
+ m_size = m_file.GetSize();
}
std::unique_ptr<PlainFileReader> PlainFileReader::Create(const std::string& filename)
{
- File::IOFile f(filename, "rb");
- if (f)
- return std::unique_ptr<PlainFileReader>(new PlainFileReader(f.ReleaseHandle()));
+ File::IOFile f(filename, "rb");
+ if (f)
+ return std::unique_ptr<PlainFileReader>(new PlainFileReader(f.ReleaseHandle()));
- return nullptr;
+ return nullptr;
}
bool PlainFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
{
- if (m_file.Seek(offset, SEEK_SET) && m_file.ReadBytes(out_ptr, nbytes))
- {
- return true;
- }
- else
- {
- m_file.Clear();
- return false;
- }
+ if (m_file.Seek(offset, SEEK_SET) && m_file.ReadBytes(out_ptr, nbytes))
+ {
+ return true;
+ }
+ else
+ {
+ m_file.Clear();
+ return false;
+ }
}
} // namespace