mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
make &some_required_shared_ptr[offs] work as expected in const context
This commit is contained in:
parent
9cda2a26f4
commit
af6b18bd68
@ -14,8 +14,8 @@
|
|||||||
#error Dont include this file directly; include emu.h instead.
|
#error Dont include this file directly; include emu.h instead.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __DEVFIND_H__
|
#ifndef MAME_EMU_DEVFIND_H
|
||||||
#define __DEVFIND_H__
|
#define MAME_EMU_DEVFIND_H
|
||||||
|
|
||||||
#define FINDER_DUMMY_TAG "finder_dummy_tag"
|
#define FINDER_DUMMY_TAG "finder_dummy_tag"
|
||||||
|
|
||||||
@ -350,7 +350,7 @@ public:
|
|||||||
|
|
||||||
// operators to make use transparent
|
// operators to make use transparent
|
||||||
operator _PointerType *() const { return this->m_target; }
|
operator _PointerType *() const { return this->m_target; }
|
||||||
_PointerType operator[](int index) const { assert(index < m_length); return this->m_target[index]; }
|
const _PointerType &operator[](int index) const { assert(index < m_length); return this->m_target[index]; }
|
||||||
_PointerType &operator[](int index) { assert(index < m_length); return this->m_target[index]; }
|
_PointerType &operator[](int index) { assert(index < m_length); return this->m_target[index]; }
|
||||||
|
|
||||||
// setter for setting the object and its length
|
// setter for setting the object and its length
|
||||||
@ -409,7 +409,7 @@ public:
|
|||||||
|
|
||||||
// operators to make use transparent
|
// operators to make use transparent
|
||||||
operator _PointerType *() const { return this->m_target; }
|
operator _PointerType *() const { return this->m_target; }
|
||||||
_PointerType operator[](int index) const { return this->m_target[index]; }
|
const _PointerType &operator[](int index) const { return this->m_target[index]; }
|
||||||
_PointerType &operator[](int index) { return this->m_target[index]; }
|
_PointerType &operator[](int index) { return this->m_target[index]; }
|
||||||
|
|
||||||
// getter for explicit fetching
|
// getter for explicit fetching
|
||||||
@ -507,4 +507,4 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* __DEVFIND_H__ */
|
#endif /* MAME_EMU_DEVFIND_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user