mirror of
https://github.com/verilator/verilator.git
synced 2025-05-03 22:16:53 +00:00
De-constify fields to appease old GCC with broken STL
No functional change intended, fixes #2342
This commit is contained in:
parent
d20a4db773
commit
53cde90c8f
@ -120,11 +120,15 @@ public:
|
||||
|
||||
private:
|
||||
struct CallbackRecord {
|
||||
const union {
|
||||
// Note: would make these fields const, but some old STL implementations
|
||||
// (the one in Ubuntu 14.04 with GCC 4.8.4 in particular) use the
|
||||
// assignment operator on inserting into collections, so they don't work
|
||||
// with const fields...
|
||||
union {
|
||||
initCb_t m_initCb; // The callback function
|
||||
dumpCb_t m_dumpCb; // The callback function
|
||||
};
|
||||
void* const m_userp; // The user pointer to pass to the callback (the symbol table)
|
||||
void* m_userp; // The user pointer to pass to the callback (the symbol table)
|
||||
CallbackRecord(initCb_t cb, void* userp)
|
||||
: m_initCb(cb)
|
||||
, m_userp(userp) {}
|
||||
|
Loading…
Reference in New Issue
Block a user