summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-11-28 16:16:23 +1100
committer Vas Crabb <vas@vastheman.com>2020-11-28 16:16:23 +1100
commit49e5d2f6c852865bc30a76d261928ddc382d9939 (patch)
tree2f9bbf3ef30e3da3af3b5c2ea733c8611c3b1bbf /src/frontend
parentddc1c446240d7fc9689dbf5630f585a2d0f11f50 (diff)
Miscellaneous cleanup/fixes:
segac2.cpp: Fixed bloxeedu credits to start DIP switches. luaengine*.cpp: Used unchecked optional getter after explicit check. informer_213.cpp: Comment out very noisy logerror. votrhv.cpp: XTAL is for crystals/resonators, not any old oscillator.
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/luaengine.ipp4
-rw-r--r--src/frontend/mame/luaengine_render.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/frontend/mame/luaengine.ipp b/src/frontend/mame/luaengine.ipp
index 811940cdd1f..8af5a937eb4 100644
--- a/src/frontend/mame/luaengine.ipp
+++ b/src/frontend/mame/luaengine.ipp
@@ -92,9 +92,9 @@ protected:
auto p(sol::stack::unqualified_check_get<T *>(L, 1));
if (!p)
luaL_error(L, "sol: 'self' is not of type '%s' (pass 'self' as first argument with ':' or call on proper type)", sol::detail::demangle<T>().c_str());
- if (!p.value())
+ if (*p)
luaL_error(L, "sol: 'self' argument is nil (pass 'self' as first argument with ':' or call on a '%s' type", sol::detail::demangle<T>().c_str());
- return *p.value();
+ return **p;
}
struct indexed_iterator
diff --git a/src/frontend/mame/luaengine_render.cpp b/src/frontend/mame/luaengine_render.cpp
index 3e5db2f52c3..68113f0650b 100644
--- a/src/frontend/mame/luaengine_render.cpp
+++ b/src/frontend/mame/luaengine_render.cpp
@@ -429,7 +429,7 @@ void lua_engine::initialize_render()
auto result(invoke(cbfunc).get<sol::optional<int> >());
if (result)
{
- return result.value();
+ return *result;
}
else
{
@@ -458,7 +458,7 @@ void lua_engine::initialize_render()
auto result(invoke(cbfunc).get<sol::optional<int> >());
if (result)
{
- return result.value();
+ return *result;
}
else
{
@@ -487,7 +487,7 @@ void lua_engine::initialize_render()
auto result(invoke(cbfunc).get<sol::optional<render_bounds> >());
if (result)
{
- b = result.value();
+ b = *result;
}
else
{
@@ -516,7 +516,7 @@ void lua_engine::initialize_render()
auto result(invoke(cbfunc).get<sol::optional<render_color> >());
if (result)
{
- c = result.value();
+ c = *result;
}
else
{