mirror of
https://github.com/holub/mame
synced 2025-07-05 01:48:29 +03:00
prettier, and fewer copies (nw)
This commit is contained in:
parent
bf3745ed2d
commit
60bd67a8bf
@ -491,17 +491,15 @@ void drc_label_list::block_end(drcuml_block &block)
|
||||
// undefined
|
||||
//-------------------------------------------------
|
||||
|
||||
drccodeptr drc_label_list::get_codeptr(uml::code_label label, drc_label_fixup_delegate callback, void *param)
|
||||
drccodeptr drc_label_list::get_codeptr(uml::code_label label, drc_label_fixup_delegate const &callback, void *param)
|
||||
{
|
||||
label_entry *curlabel = find_or_allocate(label);
|
||||
label_entry *const curlabel = find_or_allocate(label);
|
||||
|
||||
// if no code pointer, request an OOB callback
|
||||
if (curlabel->m_codeptr == nullptr && !callback.isnull())
|
||||
if (!curlabel->m_codeptr && !callback.isnull())
|
||||
{
|
||||
label_fixup *fixup = reinterpret_cast<label_fixup *>(m_cache.alloc(sizeof(*fixup)));
|
||||
new (fixup) label_fixup;
|
||||
fixup->m_callback = callback;
|
||||
fixup->m_label = curlabel;
|
||||
new (fixup) label_fixup{ nullptr, curlabel, callback };
|
||||
m_fixup_list.append(*fixup);
|
||||
m_cache.request_oob_codegen(m_oob_callback_delegate, fixup, param);
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public:
|
||||
void block_end(drcuml_block &block);
|
||||
|
||||
// get/set values
|
||||
drccodeptr get_codeptr(uml::code_label label, drc_label_fixup_delegate fixup, void *param);
|
||||
drccodeptr get_codeptr(uml::code_label label, drc_label_fixup_delegate const &fixup, void *param);
|
||||
void set_codeptr(uml::code_label label, drccodeptr codeptr);
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user