diff options
| author | 2026-04-03 02:46:36 +1100 | |
|---|---|---|
| committer | 2026-04-03 02:46:36 +1100 | |
| commit | fc0c0e8618b7ca253437310ee8a712733ea6a8e8 (patch) | |
| tree | 260554ae5442d516862e8282438d0ff05e29a319 /src | |
| parent | 93d2609de53dbbfd6b7a4c99ce2f77cbf1def06a (diff) | |
frontend/mame/luaengine_debug.cpp: Got rid of another wannabe std::span.
debugger/qt/deviceinformationwindow.cpp: Fixed another C++20 thing that
apparently only breaks with some compiler/OS/Qt version combinations.
Diffstat (limited to 'src')
| -rw-r--r-- | src/frontend/mame/luaengine_debug.cpp | 15 | ||||
| -rw-r--r-- | src/osd/modules/debugger/qt/deviceinformationwindow.cpp | 4 |
2 files changed, 5 insertions, 14 deletions
diff --git a/src/frontend/mame/luaengine_debug.cpp b/src/frontend/mame/luaengine_debug.cpp index 994f61adbfb..79f401c7a00 100644 --- a/src/frontend/mame/luaengine_debug.cpp +++ b/src/frontend/mame/luaengine_debug.cpp @@ -19,6 +19,8 @@ #include "debug/textbuf.h" #include "debugger.h" +#include <span> + namespace { @@ -293,18 +295,7 @@ void lua_engine::initialize_debug(sol::table &emu) maxparams, [this, cb = sol::protected_function(m_lua_state, execute)] (int numparams, u64 const *paramlist) -> u64 { - // TODO: C++20 will make this obsolete - class helper - { - private: - u64 const *b, *e; - public: - helper(int n, u64 const *p) : b(p), e(p + n) { } - auto begin() const { return b; } - auto end() const { return e; } - }; - - auto status(invoke(cb, sol::as_args(helper(numparams, paramlist)))); + auto status(invoke(cb, sol::as_args(std::span<u64 const>(paramlist, paramlist + numparams)))); if (status.valid()) { auto result = status.get<std::optional<u64> >(); diff --git a/src/osd/modules/debugger/qt/deviceinformationwindow.cpp b/src/osd/modules/debugger/qt/deviceinformationwindow.cpp index 2e06d8fb1ed..935d9f513fe 100644 --- a/src/osd/modules/debugger/qt/deviceinformationwindow.cpp +++ b/src/osd/modules/debugger/qt/deviceinformationwindow.cpp @@ -62,7 +62,7 @@ void DeviceInformationWindow::fill_device_information() vLayout->setContentsMargins(2,2,2,2); QFrame *primaryFrame = new QFrame(mainWindowFrame); - primaryFrame->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + primaryFrame->setFrameStyle(0 | QFrame::StyledPanel | QFrame::Sunken); // zero because C++20 doesn't allow arithmetic between different enums QGridLayout *gl1 = new QGridLayout(primaryFrame); gl1->addWidget(new QLabel(QString("Tag"), primaryFrame), 0, 0); gl1->addWidget(new QLabel(QString(m_device->tag()), primaryFrame), 0, 1); @@ -90,7 +90,7 @@ void DeviceInformationWindow::fill_device_information() if (m_device->interface(d_memory)) { QFrame *f = new QFrame(mainWindowFrame); - f->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + f->setFrameStyle(0 | QFrame::StyledPanel | QFrame::Sunken); // zero because C++20 doesn't allow arithmetic between different enums QVBoxLayout *vb = new QVBoxLayout(f); bool first = true; for (int i=0; i<d_memory->max_space_count(); i++) |
