Skip to content

Commit

Permalink
Use std::optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Jul 7, 2024
1 parent 15336aa commit bbf970b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/s25update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
#include <boost/nowide/cstdio.hpp>
#include <boost/nowide/fstream.hpp>
#include <boost/nowide/iostream.hpp>
#include <boost/optional.hpp>
#include <algorithm>
#include <array>
#include <bzlib.h>
#include <curl/curl.h>
#include <iomanip>
#include <optional>
#include <sstream>
#include <variant>
#include <vector>
Expand Down Expand Up @@ -234,13 +234,13 @@ bool DownloadFile(const std::string& url, const bfs::path& path, std::string pro
return DoDownloadFile(url, path, &progress);
}

boost::optional<std::string> DownloadFile(const std::string& url)
std::optional<std::string> DownloadFile(const std::string& url)
{
std::string tmp;
if(DoDownloadFile(url, &tmp))
return tmp;
else
return boost::none;
return std::nullopt;
}

/**
Expand Down

0 comments on commit bbf970b

Please sign in to comment.