mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
(nw) Fix inadvertently non-const pointers - emu.h edition
This fixes all the non-const pointers with static lifetime I could find with a cheap grep (in combination with the last commit). There are likely more lurking that I didn't find, and things that aren't pointers that should be made const. There are still a few mutable static pointers that break the ability to host multiple drivers but these require refactoring to fix: src/devices/sound/sidvoice.cpp:static const uint8_t* waveform30; src/devices/sound/sidvoice.cpp:static const uint8_t* waveform50; src/devices/sound/sidvoice.cpp:static const uint8_t* waveform60; src/devices/sound/sidvoice.cpp:static const uint8_t* waveform70; src/mame/drivers/pockstat.cpp: static const char *gme_id = "123-456-STD"; src/mame/machine/namco51.cpp: static const game_driver *namcoio_51XX_driver = nullptr;
This commit is contained in:
parent
49a9d1f335
commit
b98658573b
@ -20,15 +20,15 @@ namespace util {
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const char hash_collection::HASH_CRC;
|
||||
const char hash_collection::HASH_SHA1;
|
||||
char const hash_collection::HASH_CRC;
|
||||
char const hash_collection::HASH_SHA1;
|
||||
|
||||
const char *hash_collection::HASH_TYPES_CRC = "R";
|
||||
const char *hash_collection::HASH_TYPES_CRC_SHA1 = "RS";
|
||||
const char *hash_collection::HASH_TYPES_ALL = "RS";
|
||||
char const *const hash_collection::HASH_TYPES_CRC = "R";
|
||||
char const *const hash_collection::HASH_TYPES_CRC_SHA1 = "RS";
|
||||
char const *const hash_collection::HASH_TYPES_ALL = "RS";
|
||||
|
||||
const char hash_collection::FLAG_NO_DUMP;
|
||||
const char hash_collection::FLAG_BAD_DUMP;
|
||||
char const hash_collection::FLAG_NO_DUMP;
|
||||
char const hash_collection::FLAG_BAD_DUMP;
|
||||
|
||||
|
||||
|
||||
|
@ -46,9 +46,9 @@ public:
|
||||
static constexpr char HASH_SHA1 = 'S';
|
||||
|
||||
// common combinations for requests
|
||||
static const char *HASH_TYPES_CRC;
|
||||
static const char *HASH_TYPES_CRC_SHA1;
|
||||
static const char *HASH_TYPES_ALL;
|
||||
static char const *const HASH_TYPES_CRC;
|
||||
static char const *const HASH_TYPES_CRC_SHA1;
|
||||
static char const *const HASH_TYPES_ALL;
|
||||
|
||||
// flags are identified by punctuation marks
|
||||
static constexpr char FLAG_NO_DUMP = '!';
|
||||
|
Loading…
Reference in New Issue
Block a user