From 835aa3f83d6aa92d59f76d19b37f7ac9b3633064 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 22 Feb 2023 19:55:32 -0300 Subject: [PATCH] Use std::nullptr_t defined in --- src/app/script/values.cpp | 5 +++-- src/app/ui/app_menuitem.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/script/values.cpp b/src/app/script/values.cpp index a87bbbfcc..dc5818a6f 100644 --- a/src/app/script/values.cpp +++ b/src/app/script/values.cpp @@ -16,6 +16,7 @@ #include "doc/remap.h" #include +#include #include namespace app { @@ -27,7 +28,7 @@ namespace script { // nullptr_t template<> -void push_value_to_lua(lua_State* L, const nullptr_t&) { +void push_value_to_lua(lua_State* L, const std::nullptr_t&) { TRACEARGS("push_value_to_lua nullptr_t"); lua_pushnil(L); } @@ -315,7 +316,7 @@ void push_value_to_lua(lua_State* L, const doc::UserData::Variant& value) #if 1 // We are targetting macOS 10.9, so we don't have the std::visit() available switch (value.type()) { case USER_DATA_PROPERTY_TYPE_NULLPTR: - push_value_to_lua(L, nullptr); + push_value_to_lua(L, nullptr); break; case USER_DATA_PROPERTY_TYPE_BOOL: push_value_to_lua(L, *std::get_if(&value)); diff --git a/src/app/ui/app_menuitem.h b/src/app/ui/app_menuitem.h index 4cd2e3f9b..7031ef169 100644 --- a/src/app/ui/app_menuitem.h +++ b/src/app/ui/app_menuitem.h @@ -15,6 +15,7 @@ #include "os/shortcut.h" #include "ui/menu.h" +#include #include namespace app {