mirror of
https://github.com/holub/mame
synced 2025-06-23 21:06:38 +03:00
Merge pull request #1390 from npwoods/fix_null_option_guide
Subscripting std::array<..., 0> is bad; working around this specific case
This commit is contained in:
commit
407dede1a2
@ -142,7 +142,7 @@ public:
|
|||||||
template<typename... T>
|
template<typename... T>
|
||||||
option_guide_impl(T &&... elems)
|
option_guide_impl(T &&... elems)
|
||||||
: std::array<option_guide::entry, Count>({ std::forward<T>(elems)... })
|
: std::array<option_guide::entry, Count>({ std::forward<T>(elems)... })
|
||||||
, option_guide(&(*this)[0], &(*this)[0] + Count)
|
, option_guide(Count > 0 ? &(*this)[0] : nullptr, Count > 0 ? &(*this)[0] + Count : nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user