diff options
author | 2018-09-20 14:32:59 +1000 | |
---|---|---|
committer | 2018-09-20 14:32:59 +1000 | |
commit | b98658573b11ecb8afce4ca340866e56131b4dc8 (patch) | |
tree | cdfc442d81f49ea20807d28d1f96c9a078b321b9 | |
parent | 49a9d1f33543f62965bd9e868402c97fb22f0e91 (diff) |
(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;
-rw-r--r-- | src/lib/util/hash.cpp | 14 | ||||
-rw-r--r-- | src/lib/util/hash.h | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/util/hash.cpp b/src/lib/util/hash.cpp index 4593ad181a4..ddb6f52ac5c 100644 --- a/src/lib/util/hash.cpp +++ b/src/lib/util/hash.cpp @@ -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; diff --git a/src/lib/util/hash.h b/src/lib/util/hash.h index cb87f3f8b3c..98a851bfd60 100644 --- a/src/lib/util/hash.h +++ b/src/lib/util/hash.h @@ -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 = '!'; |