mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Merge pull request #1314 from ryandesign/nullptr_t
This commit is contained in:
commit
9361f29479
@ -9,6 +9,7 @@
|
||||
#include "StaticAnalyser.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
@ -179,7 +180,7 @@ static Media GetMediaAndPlatforms(const std::string &file_name, TargetPlatform::
|
||||
std::visit([&](auto &&arg) {
|
||||
using Type = typename std::decay<decltype(arg)>::type;
|
||||
|
||||
if constexpr (std::is_same<Type, nullptr_t>::value) {
|
||||
if constexpr (std::is_same<Type, std::nullptr_t>::value) {
|
||||
// It's valid for no media to be returned.
|
||||
} else if constexpr (std::is_same<Type, Disk::DiskImageHolderBase *>::value) {
|
||||
accumulator.insert(TargetPlatform::DiskII, std::shared_ptr<Disk::DiskImageHolderBase>(arg));
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "../../../FileHolder.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <variant>
|
||||
|
||||
namespace Storage::Disk {
|
||||
@ -28,7 +29,7 @@ namespace Storage::Disk {
|
||||
|
||||
class Disk2MG {
|
||||
public:
|
||||
using DiskOrMassStorageDevice = std::variant<nullptr_t, DiskImageHolderBase *, Storage::MassStorage::MassStorageDevice *>;
|
||||
using DiskOrMassStorageDevice = std::variant<std::nullptr_t, DiskImageHolderBase *, Storage::MassStorage::MassStorageDevice *>;
|
||||
static DiskOrMassStorageDevice open(const std::string &file_name);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user