Remove src/3rdparty/optional
This commit is contained in:
12
src/fios.cpp
12
src/fios.cpp
@@ -22,7 +22,7 @@
|
||||
#include "tar_type.h"
|
||||
#include <sys/stat.h>
|
||||
#include <functional>
|
||||
#include "3rdparty/optional/ottd_optional.h"
|
||||
#include <optional>
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h>
|
||||
@@ -494,7 +494,7 @@ FiosType FiosGetSavegameListCallback(SaveLoadOperation fop, const std::string &f
|
||||
*/
|
||||
void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list)
|
||||
{
|
||||
static opt::optional<std::string> fios_save_path;
|
||||
static std::optional<std::string> fios_save_path;
|
||||
|
||||
if (!fios_save_path) fios_save_path = FioFindDirectory(SAVE_DIR);
|
||||
|
||||
@@ -543,7 +543,7 @@ static FiosType FiosGetScenarioListCallback(SaveLoadOperation fop, const std::st
|
||||
*/
|
||||
void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list)
|
||||
{
|
||||
static opt::optional<std::string> fios_scn_path;
|
||||
static std::optional<std::string> fios_scn_path;
|
||||
|
||||
/* Copy the default path on first run or on 'New Game' */
|
||||
if (!fios_scn_path) fios_scn_path = FioFindDirectory(SCENARIO_DIR);
|
||||
@@ -604,7 +604,7 @@ static FiosType FiosGetHeightmapListCallback(SaveLoadOperation fop, const std::s
|
||||
*/
|
||||
void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list)
|
||||
{
|
||||
static opt::optional<std::string> fios_hmap_path;
|
||||
static std::optional<std::string> fios_hmap_path;
|
||||
|
||||
if (!fios_hmap_path) fios_hmap_path = FioFindDirectory(HEIGHTMAP_DIR);
|
||||
|
||||
@@ -621,7 +621,7 @@ void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list)
|
||||
*/
|
||||
const char *FiosGetScreenshotDir()
|
||||
{
|
||||
static opt::optional<std::string> fios_screenshot_path;
|
||||
static std::optional<std::string> fios_screenshot_path;
|
||||
|
||||
if (!fios_screenshot_path) fios_screenshot_path = FioFindDirectory(SCREENSHOT_DIR);
|
||||
|
||||
@@ -750,7 +750,7 @@ void ScanScenarios()
|
||||
*/
|
||||
FiosNumberedSaveName::FiosNumberedSaveName(const std::string &prefix) : prefix(prefix), number(-1)
|
||||
{
|
||||
static opt::optional<std::string> _autosave_path;
|
||||
static std::optional<std::string> _autosave_path;
|
||||
if (!_autosave_path) _autosave_path = FioFindDirectory(AUTOSAVE_DIR);
|
||||
|
||||
static std::string _prefix; ///< Static as the lambda needs access to it.
|
||||
|
Reference in New Issue
Block a user