mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-08 17:29:34 +00:00
Include <cstddef> and use std::nullptr_t not nullptr_t
Fixes "error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?" when compiling with Xcode 12.4.
This commit is contained in:
parent
789c4a080f
commit
070efd99e0
@ -9,6 +9,7 @@
|
|||||||
#include "StaticAnalyser.hpp"
|
#include "StaticAnalyser.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstddef>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
@ -179,7 +180,7 @@ static Media GetMediaAndPlatforms(const std::string &file_name, TargetPlatform::
|
|||||||
std::visit([&](auto &&arg) {
|
std::visit([&](auto &&arg) {
|
||||||
using Type = typename std::decay<decltype(arg)>::type;
|
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.
|
// It's valid for no media to be returned.
|
||||||
} else if constexpr (std::is_same<Type, Disk::DiskImageHolderBase *>::value) {
|
} else if constexpr (std::is_same<Type, Disk::DiskImageHolderBase *>::value) {
|
||||||
accumulator.insert(TargetPlatform::DiskII, std::shared_ptr<Disk::DiskImageHolderBase>(arg));
|
accumulator.insert(TargetPlatform::DiskII, std::shared_ptr<Disk::DiskImageHolderBase>(arg));
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "../../../FileHolder.hpp"
|
#include "../../../FileHolder.hpp"
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
|
||||||
namespace Storage::Disk {
|
namespace Storage::Disk {
|
||||||
@ -28,7 +29,7 @@ namespace Storage::Disk {
|
|||||||
|
|
||||||
class Disk2MG {
|
class Disk2MG {
|
||||||
public:
|
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);
|
static DiskOrMassStorageDevice open(const std::string &file_name);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user