diff --git a/src/emu/devfind.h b/src/emu/devfind.h index 2493a66782f..e268bc9784a 100644 --- a/src/emu/devfind.h +++ b/src/emu/devfind.h @@ -267,8 +267,10 @@ public: // construction/destruction ioport_array_finder(device_t &base, const char *basetag) { - for (int index = 0; index < _Count; index++) { - m_array[index].reset(global_alloc(ioport_finder_type(base, strformat(m_tag[index], "%s.%d", basetag, index).c_str()))); + for (int index = 0; index < _Count; index++) + { + strformat(m_tag[index], "%s.%d", basetag, index); + m_array[index].reset(global_alloc(ioport_finder_type(base, m_tag[index].c_str()))); } } @@ -437,7 +439,10 @@ public: shared_ptr_array_finder(device_t &base, const char *basetag, UINT8 width = sizeof(_PointerType) * 8) { for (int index = 0; index < _Count; index++) - m_array[index].reset(global_alloc(shared_ptr_type(base, strformat(m_tag[index],"%s.%d", basetag, index).c_str(), width))); + { + strformat(m_tag[index],"%s.%d", basetag, index); + m_array[index].reset(global_alloc(shared_ptr_type(base, m_tag[index].c_str(), width))); + } } // array accessors