From 7a5eda59146306dedaf3e6f07f97a8c6898543dd Mon Sep 17 00:00:00 2001 From: Frederic L Date: Tue, 30 Oct 2018 05:03:25 +0100 Subject: global: Use std::optional instead of boost::optional (#1578) * get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build --- src/core/file_sys/vfs.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/file_sys/vfs.h') diff --git a/src/core/file_sys/vfs.h b/src/core/file_sys/vfs.h index 09dc9f288..002f99d4e 100644 --- a/src/core/file_sys/vfs.h +++ b/src/core/file_sys/vfs.h @@ -4,13 +4,15 @@ #pragma once +#include #include #include +#include #include #include #include #include -#include + #include "common/common_types.h" #include "core/file_sys/vfs_types.h" @@ -103,8 +105,8 @@ public: // into file. Returns number of bytes successfully written. virtual std::size_t Write(const u8* data, std::size_t length, std::size_t offset = 0) = 0; - // Reads exactly one byte at the offset provided, returning boost::none on error. - virtual boost::optional ReadByte(std::size_t offset = 0) const; + // Reads exactly one byte at the offset provided, returning std::nullopt on error. + virtual std::optional ReadByte(std::size_t offset = 0) const; // Reads size bytes starting at offset in file into a vector. virtual std::vector ReadBytes(std::size_t size, std::size_t offset = 0) const; // Reads all the bytes from the file into a vector. Equivalent to 'file->Read(file->GetSize(), -- cgit v1.2.3