mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
fixed some clang-tidy warnings (nw) (#6229)
* fixed some readability-static-accessed-through-instance clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
This commit is contained in:
parent
4da780c243
commit
c761a27e5c
@ -60,7 +60,7 @@ std::string i8089_disassembler::invalid()
|
||||
}
|
||||
|
||||
// to register or memory from immediate
|
||||
std::string i8089_disassembler::from_i(std::string instr8, std::string instr16, std::string target)
|
||||
std::string i8089_disassembler::from_i(const std::string &instr8, const std::string &instr16, const std::string &target)
|
||||
{
|
||||
if (m_w == 0 && m_wb == 1)
|
||||
return util::string_format("%s %s, %02x", instr8, target, fetch_immediate());
|
||||
@ -71,7 +71,7 @@ std::string i8089_disassembler::from_i(std::string instr8, std::string instr16,
|
||||
}
|
||||
|
||||
// register, immediate
|
||||
std::string i8089_disassembler::inst_ri(std::string instr8, std::string instr16)
|
||||
std::string i8089_disassembler::inst_ri(const std::string &instr8, const std::string &instr16)
|
||||
{
|
||||
if (m_mm == 0)
|
||||
return from_i(instr8, instr16, m_reg[m_brp]);
|
||||
@ -80,7 +80,7 @@ std::string i8089_disassembler::inst_ri(std::string instr8, std::string instr16)
|
||||
}
|
||||
|
||||
// register
|
||||
std::string i8089_disassembler::inst_r(std::string instr)
|
||||
std::string i8089_disassembler::inst_r(const std::string &instr)
|
||||
{
|
||||
if (m_mm == 0 && m_w == 0 && m_aa == 0 && m_wb == 0)
|
||||
return util::string_format("%s %s", instr, m_reg[m_brp]);
|
||||
@ -89,7 +89,7 @@ std::string i8089_disassembler::inst_r(std::string instr)
|
||||
}
|
||||
|
||||
// jump register
|
||||
std::string i8089_disassembler::inst_jr(std::string instr8, std::string instr16)
|
||||
std::string i8089_disassembler::inst_jr(const std::string &instr8, const std::string &instr16)
|
||||
{
|
||||
uint16_t i = fetch_immediate();
|
||||
if (m_mm == 0 && m_w == 0 && m_wb == 1)
|
||||
@ -101,14 +101,14 @@ std::string i8089_disassembler::inst_jr(std::string instr8, std::string instr16)
|
||||
}
|
||||
|
||||
// memory immediate
|
||||
std::string i8089_disassembler::inst_mi(std::string instr8, std::string instr16)
|
||||
std::string i8089_disassembler::inst_mi(const std::string &instr8, const std::string &instr16)
|
||||
{
|
||||
std::string off = offset();
|
||||
return from_i(instr8, instr16, off);
|
||||
}
|
||||
|
||||
// register memory
|
||||
std::string i8089_disassembler::inst_rm(std::string instr8, std::string instr16)
|
||||
std::string i8089_disassembler::inst_rm(const std::string &instr8, const std::string &instr16)
|
||||
{
|
||||
std::string off = offset();
|
||||
if (m_w == 0 && m_wb == 0)
|
||||
@ -120,7 +120,7 @@ std::string i8089_disassembler::inst_rm(std::string instr8, std::string instr16)
|
||||
}
|
||||
|
||||
// jump memory
|
||||
std::string i8089_disassembler::inst_jm(std::string jump8short, std::string jump8long)
|
||||
std::string i8089_disassembler::inst_jm(const std::string &jump8short, const std::string &jump8long)
|
||||
{
|
||||
std::string off = offset();
|
||||
uint16_t i = fetch_immediate();
|
||||
@ -133,7 +133,7 @@ std::string i8089_disassembler::inst_jm(std::string jump8short, std::string jump
|
||||
}
|
||||
|
||||
// jump memory bit
|
||||
std::string i8089_disassembler::inst_jmb(std::string jump8short, std::string jump8long)
|
||||
std::string i8089_disassembler::inst_jmb(const std::string &jump8short, const std::string &jump8long)
|
||||
{
|
||||
std::string off = offset();
|
||||
uint16_t i = fetch_immediate();
|
||||
@ -146,7 +146,7 @@ std::string i8089_disassembler::inst_jmb(std::string jump8short, std::string jum
|
||||
}
|
||||
|
||||
// memory register
|
||||
std::string i8089_disassembler::inst_mr(std::string instr8, std::string instr16)
|
||||
std::string i8089_disassembler::inst_mr(const std::string &instr8, const std::string &instr16)
|
||||
{
|
||||
std::string off = offset();
|
||||
if (m_w == 0 && m_wb == 0)
|
||||
@ -158,7 +158,7 @@ std::string i8089_disassembler::inst_mr(std::string instr8, std::string instr16)
|
||||
}
|
||||
|
||||
// pointer memory
|
||||
std::string i8089_disassembler::inst_pm(std::string instr16)
|
||||
std::string i8089_disassembler::inst_pm(const std::string &instr16)
|
||||
{
|
||||
std::string off = offset();
|
||||
if (m_w == 1 && m_wb == 0)
|
||||
@ -168,7 +168,7 @@ std::string i8089_disassembler::inst_pm(std::string instr16)
|
||||
}
|
||||
|
||||
// memory pointer
|
||||
std::string i8089_disassembler::inst_mp(std::string instr16)
|
||||
std::string i8089_disassembler::inst_mp(const std::string &instr16)
|
||||
{
|
||||
std::string off = offset();
|
||||
if (m_w == 1 && m_wb == 0)
|
||||
@ -178,7 +178,7 @@ std::string i8089_disassembler::inst_mp(std::string instr16)
|
||||
}
|
||||
|
||||
// jump memory
|
||||
std::string i8089_disassembler::inst_j16(std::string jump8short, std::string jump16short, std::string jump8long, std::string jump16long)
|
||||
std::string i8089_disassembler::inst_j16(const std::string &jump8short, const std::string &jump16short, const std::string &jump8long, const std::string &jump16long)
|
||||
{
|
||||
std::string off = offset();
|
||||
uint16_t i = fetch_immediate();
|
||||
@ -195,7 +195,7 @@ std::string i8089_disassembler::inst_j16(std::string jump8short, std::string jum
|
||||
}
|
||||
|
||||
// memory
|
||||
std::string i8089_disassembler::inst_m(std::string instr8, std::string instr16)
|
||||
std::string i8089_disassembler::inst_m(const std::string &instr8, const std::string &instr16)
|
||||
{
|
||||
std::string off = offset();
|
||||
if (m_w == 0 && m_wb == 0)
|
||||
@ -207,7 +207,7 @@ std::string i8089_disassembler::inst_m(std::string instr8, std::string instr16)
|
||||
}
|
||||
|
||||
// memory bit
|
||||
std::string i8089_disassembler::inst_b(std::string instr)
|
||||
std::string i8089_disassembler::inst_b(const std::string &instr)
|
||||
{
|
||||
std::string off = offset();
|
||||
if (m_w == 0 && m_wb == 0)
|
||||
|
@ -49,20 +49,20 @@ private:
|
||||
std::string offset();
|
||||
std::string invalid();
|
||||
|
||||
std::string from_i(std::string instr8, std::string instr16, std::string target);
|
||||
std::string inst_ri(std::string instr8, std::string instr16);
|
||||
std::string inst_r(std::string instr);
|
||||
std::string inst_jr(std::string instr8, std::string instr16);
|
||||
std::string inst_mi(std::string instr8, std::string instr16);
|
||||
std::string inst_rm(std::string instr8, std::string instr16);
|
||||
std::string inst_jm(std::string jump8short, std::string jump8long);
|
||||
std::string inst_jmb(std::string jump8short, std::string jump8long);
|
||||
std::string inst_mr(std::string instr8, std::string instr16);
|
||||
std::string inst_pm(std::string instr16);
|
||||
std::string inst_mp(std::string instr16);
|
||||
std::string inst_j16(std::string jump8short, std::string jump16short, std::string jump8long, std::string jump16long);
|
||||
std::string inst_m(std::string instr8, std::string instr16);
|
||||
std::string inst_b(std::string instr);
|
||||
std::string from_i(const std::string &instr8, const std::string &instr16, const std::string &target);
|
||||
std::string inst_ri(const std::string &instr8, const std::string &instr16);
|
||||
std::string inst_r(const std::string &instr);
|
||||
std::string inst_jr(const std::string &instr8, const std::string &instr16);
|
||||
std::string inst_mi(const std::string &instr8, const std::string &instr16);
|
||||
std::string inst_rm(const std::string &instr8, const std::string &instr16);
|
||||
std::string inst_jm(const std::string &jump8short, const std::string &jump8long);
|
||||
std::string inst_jmb(const std::string &jump8short, const std::string &jump8long);
|
||||
std::string inst_mr(const std::string &instr8, const std::string &instr16);
|
||||
std::string inst_pm(const std::string &instr16);
|
||||
std::string inst_mp(const std::string &instr16);
|
||||
std::string inst_j16(const std::string &jump8short, const std::string &jump16short, const std::string &jump8long, const std::string &jump16long);
|
||||
std::string inst_m(const std::string &instr8, const std::string &instr16);
|
||||
std::string inst_b(const std::string &instr);
|
||||
|
||||
std::string do_disassemble();
|
||||
void load_instruction();
|
||||
|
@ -360,7 +360,7 @@ int8_t ns32000_disassembler::short2int(uint8_t val)
|
||||
return (val & 0x08) ? val | 0xf0 : val;
|
||||
}
|
||||
|
||||
std::string ns32000_disassembler::mnemonic_index(std::string form, std::string itype, std::string ftype)
|
||||
std::string ns32000_disassembler::mnemonic_index(std::string form, const std::string &itype, const std::string &ftype)
|
||||
{
|
||||
if (itype.size() && form.find('i') != std::string::npos)
|
||||
form.replace(form.find('i'), 1, itype);
|
||||
|
@ -101,7 +101,7 @@ private:
|
||||
static char const *const M[];
|
||||
static char const *const PR[];
|
||||
|
||||
std::string mnemonic_index(std::string form, std::string itype, std::string ftype);
|
||||
std::string mnemonic_index(std::string form, const std::string &itype, const std::string &ftype);
|
||||
uint8_t opcode_format(uint8_t byte);
|
||||
int8_t short2int(uint8_t val);
|
||||
static inline int32_t get_disp(offs_t &pc, const data_buffer &opcodes);
|
||||
|
@ -45,7 +45,7 @@ std::string s2650_disassembler::IMM(offs_t pc, const data_buffer ¶ms)
|
||||
|
||||
const char s2650_disassembler::cc[4] = { 'z', 'p', 'm', 'a' };
|
||||
|
||||
void s2650_disassembler::add(std::string &buf, std::string str)
|
||||
void s2650_disassembler::add(std::string &buf, const std::string &str)
|
||||
{
|
||||
if(!buf.empty())
|
||||
buf += '+';
|
||||
|
@ -34,7 +34,7 @@ private:
|
||||
static const int rel[0x100];
|
||||
static const char cc[4];
|
||||
|
||||
void add(std::string &buf, std::string str);
|
||||
void add(std::string &buf, const std::string &str);
|
||||
std::string SYM(int addr);
|
||||
std::string IMM(offs_t pc, const data_buffer ¶ms);
|
||||
std::string IMM_PSL(offs_t pc, const data_buffer ¶ms);
|
||||
|
@ -37,7 +37,7 @@ u32 meg_disassembler::b(u64 opc, u32 start, u32 count)
|
||||
return (opc >> start) & ((1 << count) - 1);
|
||||
}
|
||||
|
||||
void meg_disassembler::append(std::string &r, std::string e)
|
||||
void meg_disassembler::append(std::string &r, const std::string &e)
|
||||
{
|
||||
if(r != "")
|
||||
r += " ; ";
|
||||
|
@ -33,7 +33,7 @@ private:
|
||||
std::string goffset(offs_t address) const;
|
||||
|
||||
static inline u32 b(u64 opc, u32 start, u32 count);
|
||||
static inline void append(std::string &r, std::string e);
|
||||
static inline void append(std::string &r, const std::string &e);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -60,7 +60,7 @@ int configuration_manager::load_settings()
|
||||
int loaded = 0;
|
||||
|
||||
/* loop over all registrants and call their init function */
|
||||
for (auto type : m_typelist)
|
||||
for (const auto &type : m_typelist)
|
||||
type.load(config_type::INIT, nullptr);
|
||||
|
||||
/* now load the controller file */
|
||||
@ -93,7 +93,7 @@ int configuration_manager::load_settings()
|
||||
loaded = load_xml(file, config_type::GAME);
|
||||
|
||||
/* loop over all registrants and call their final function */
|
||||
for (auto type : m_typelist)
|
||||
for (const auto &type : m_typelist)
|
||||
type.load(config_type::FINAL, nullptr);
|
||||
|
||||
/* if we didn't find a saved config, return 0 so the main core knows that it */
|
||||
@ -105,7 +105,7 @@ int configuration_manager::load_settings()
|
||||
void configuration_manager::save_settings()
|
||||
{
|
||||
/* loop over all registrants and call their init function */
|
||||
for (auto type : m_typelist)
|
||||
for (const auto &type : m_typelist)
|
||||
type.save(config_type::INIT, nullptr);
|
||||
|
||||
/* save the defaults file */
|
||||
@ -120,7 +120,7 @@ void configuration_manager::save_settings()
|
||||
save_xml(file, config_type::GAME);
|
||||
|
||||
/* loop over all registrants and call their final function */
|
||||
for (auto type : m_typelist)
|
||||
for (const auto &type : m_typelist)
|
||||
type.save(config_type::FINAL, nullptr);
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ int configuration_manager::load_xml(emu_file &file, config_type which_type)
|
||||
osd_printf_debug("Entry: %s -- processing\n", name);
|
||||
|
||||
/* loop over all registrants and call their load function */
|
||||
for (auto type : m_typelist)
|
||||
for (const auto &type : m_typelist)
|
||||
type.load(which_type, systemnode->get_child(type.name.c_str()));
|
||||
count++;
|
||||
}
|
||||
@ -246,7 +246,7 @@ int configuration_manager::save_xml(emu_file &file, config_type which_type)
|
||||
|
||||
/* create the input node and write it out */
|
||||
/* loop over all registrants and call their save function */
|
||||
for (auto type : m_typelist)
|
||||
for (const auto &type : m_typelist)
|
||||
{
|
||||
util::xml::data_node *const curnode = systemnode->add_child(type.name.c_str(), nullptr);
|
||||
if (!curnode)
|
||||
|
@ -381,7 +381,7 @@ void device_image_interface::setup_working_directory()
|
||||
// get user-specified directory and make sure it exists
|
||||
m_working_directory = device().mconfig().options().sw_path();
|
||||
// if multipath, get first
|
||||
size_t i = m_working_directory.find_first_of(";");
|
||||
size_t i = m_working_directory.find_first_of(';');
|
||||
if (i != std::string::npos)
|
||||
m_working_directory.resize(i);
|
||||
// validate directory
|
||||
|
@ -2582,7 +2582,7 @@ void memory_bank::set_base(void *base)
|
||||
m_curentry = 0;
|
||||
}
|
||||
m_entries[m_curentry] = reinterpret_cast<u8 *>(base);
|
||||
for(auto cb : m_alloc_notifier)
|
||||
for(const auto &cb : m_alloc_notifier)
|
||||
cb(base);
|
||||
m_alloc_notifier.clear();
|
||||
}
|
||||
|
@ -295,8 +295,8 @@ http_manager::http_manager(bool active, short port, const char *root)
|
||||
}
|
||||
|
||||
// Determine the file extension.
|
||||
std::size_t last_slash_pos = path.find_last_of("/");
|
||||
std::size_t last_dot_pos = path.find_last_of(".");
|
||||
std::size_t last_slash_pos = path.find_last_of('/');
|
||||
std::size_t last_dot_pos = path.find_last_of('.');
|
||||
std::string extension;
|
||||
if (last_dot_pos != std::string::npos && last_dot_pos > last_slash_pos)
|
||||
{
|
||||
|
@ -521,8 +521,8 @@ std::string running_machine::get_statename(const char *option) const
|
||||
int name_found = 0;
|
||||
|
||||
// find length of the device name
|
||||
int end1 = statename_str.find("/", pos + 3);
|
||||
int end2 = statename_str.find("%", pos + 3);
|
||||
int end1 = statename_str.find('/', pos + 3);
|
||||
int end2 = statename_str.find('%', pos + 3);
|
||||
int end;
|
||||
|
||||
if ((end1 != -1) && (end2 != -1))
|
||||
|
@ -2149,14 +2149,14 @@ public:
|
||||
// split out position names from string and figure out our number of symbols
|
||||
int location;
|
||||
m_numstops = 0;
|
||||
location=symbollist.find(",");
|
||||
location=symbollist.find(',');
|
||||
while (location!=-1)
|
||||
{
|
||||
m_stopnames[m_numstops] = symbollist;
|
||||
m_stopnames[m_numstops] = m_stopnames[m_numstops].substr(0, location);
|
||||
symbollist = symbollist.substr(location+1, symbollist.length()-(location-1));
|
||||
m_numstops++;
|
||||
location=symbollist.find(",");
|
||||
location=symbollist.find(',');
|
||||
}
|
||||
m_stopnames[m_numstops++] = symbollist;
|
||||
|
||||
@ -2166,7 +2166,7 @@ public:
|
||||
|
||||
for (int i=0;i<m_numstops;i++)
|
||||
{
|
||||
location=m_stopnames[i].find(":");
|
||||
location=m_stopnames[i].find(':');
|
||||
if (location!=-1)
|
||||
{
|
||||
m_imagefile[i] = m_stopnames[i];
|
||||
|
@ -222,7 +222,7 @@ bool validity_checker::check_all_matching(const char *string)
|
||||
bool validated_any = false;
|
||||
while (m_drivlist.next())
|
||||
{
|
||||
if (m_drivlist.matches(string, m_drivlist.driver().name))
|
||||
if (driver_list::matches(string, m_drivlist.driver().name))
|
||||
{
|
||||
validate_one(m_drivlist.driver());
|
||||
validated_any = true;
|
||||
@ -1418,8 +1418,8 @@ void validity_checker::validate_driver()
|
||||
|
||||
// determine if we are a clone
|
||||
bool is_clone = (strcmp(m_current_driver->parent, "0") != 0);
|
||||
int clone_of = m_drivlist.clone(*m_current_driver);
|
||||
if (clone_of != -1 && (m_drivlist.driver(clone_of).flags & machine_flags::IS_BIOS_ROOT))
|
||||
int clone_of = driver_list::clone(*m_current_driver);
|
||||
if (clone_of != -1 && (driver_list::driver(clone_of).flags & machine_flags::IS_BIOS_ROOT))
|
||||
is_clone = false;
|
||||
|
||||
// if we have at least 100 drivers, validate the clone
|
||||
@ -1428,11 +1428,11 @@ void validity_checker::validate_driver()
|
||||
osd_printf_error("Driver is a clone of nonexistent driver %s\n", m_current_driver->parent);
|
||||
|
||||
// look for recursive cloning
|
||||
if (clone_of != -1 && &m_drivlist.driver(clone_of) == m_current_driver)
|
||||
if (clone_of != -1 && &driver_list::driver(clone_of) == m_current_driver)
|
||||
osd_printf_error("Driver is a clone of itself\n");
|
||||
|
||||
// look for clones that are too deep
|
||||
if (clone_of != -1 && (clone_of = m_drivlist.non_bios_clone(clone_of)) != -1)
|
||||
if (clone_of != -1 && (clone_of = driver_list::non_bios_clone(clone_of)) != -1)
|
||||
osd_printf_error("Driver is a clone of a clone\n");
|
||||
|
||||
// make sure the driver name is not too long
|
||||
@ -1463,16 +1463,16 @@ void validity_checker::validate_driver()
|
||||
compatible_with = nullptr;
|
||||
|
||||
// check for this driver being compatible with a nonexistent driver
|
||||
if (compatible_with != nullptr && m_drivlist.find(m_current_driver->compatible_with) == -1)
|
||||
if (compatible_with != nullptr && driver_list::find(m_current_driver->compatible_with) == -1)
|
||||
osd_printf_error("Driver is listed as compatible with nonexistent driver %s\n", m_current_driver->compatible_with);
|
||||
|
||||
// check for clone_of and compatible_with being specified at the same time
|
||||
if (m_drivlist.clone(*m_current_driver) != -1 && compatible_with != nullptr)
|
||||
if (driver_list::clone(*m_current_driver) != -1 && compatible_with != nullptr)
|
||||
osd_printf_error("Driver cannot be both a clone and listed as compatible with another system\n");
|
||||
|
||||
// find any recursive dependencies on the current driver
|
||||
for (int other_drv = m_drivlist.compatible_with(*m_current_driver); other_drv != -1; other_drv = m_drivlist.compatible_with(other_drv))
|
||||
if (m_current_driver == &m_drivlist.driver(other_drv))
|
||||
for (int other_drv = driver_list::compatible_with(*m_current_driver); other_drv != -1; other_drv = driver_list::compatible_with(other_drv))
|
||||
if (m_current_driver == &driver_list::driver(other_drv))
|
||||
{
|
||||
osd_printf_error("Driver is recursively compatible with itself\n");
|
||||
break;
|
||||
|
@ -1358,8 +1358,8 @@ osd_file::error video_manager::open_next(emu_file &file, const char *extension,
|
||||
int name_found = 0;
|
||||
|
||||
// find length of the device name
|
||||
int end1 = snapstr.find("/", pos + 3);
|
||||
int end2 = snapstr.find("%", pos + 3);
|
||||
int end1 = snapstr.find('/', pos + 3);
|
||||
int end2 = snapstr.find('%', pos + 3);
|
||||
int end;
|
||||
|
||||
if ((end1 != -1) && (end2 != -1))
|
||||
|
@ -415,18 +415,15 @@ DISCRETE_SOUND_END
|
||||
WRITE8_MEMBER( blockade_state::sound_freq_w )
|
||||
{
|
||||
m_discrete->write(BLOCKADE_NOTE_DATA, data);
|
||||
return;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( blockade_state::env_on_w )
|
||||
{
|
||||
m_samples->start(0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( blockade_state::env_off_w )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const char *const blockade_sample_names[] =
|
||||
|
@ -653,23 +653,23 @@ MACHINE_RESET_MEMBER(mtech_state, megatech)
|
||||
|
||||
std::string region_tag;
|
||||
if (m_cart1->get_rom_size() > 0)
|
||||
m_cart_reg[0] = memregion(region_tag.assign(m_cart1->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[0] = memregion(region_tag.assign(m_cart1->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
else
|
||||
m_cart_reg[0] = memregion(":mt_slot1:cart");
|
||||
if (m_cart2)
|
||||
m_cart_reg[1] = memregion(region_tag.assign(m_cart2->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[1] = memregion(region_tag.assign(m_cart2->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
if (m_cart3)
|
||||
m_cart_reg[2] = memregion(region_tag.assign(m_cart3->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[2] = memregion(region_tag.assign(m_cart3->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
if (m_cart4)
|
||||
m_cart_reg[3] = memregion(region_tag.assign(m_cart4->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[3] = memregion(region_tag.assign(m_cart4->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
if (m_cart5)
|
||||
m_cart_reg[4] = memregion(region_tag.assign(m_cart5->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[4] = memregion(region_tag.assign(m_cart5->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
if (m_cart6)
|
||||
m_cart_reg[5] = memregion(region_tag.assign(m_cart6->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[5] = memregion(region_tag.assign(m_cart6->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
if (m_cart7)
|
||||
m_cart_reg[6] = memregion(region_tag.assign(m_cart7->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[6] = memregion(region_tag.assign(m_cart7->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
if (m_cart8)
|
||||
m_cart_reg[7] = memregion(region_tag.assign(m_cart8->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[7] = memregion(region_tag.assign(m_cart8->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
|
||||
switch_cart(0);
|
||||
}
|
||||
|
@ -1191,19 +1191,19 @@ MACHINE_RESET_MEMBER(stv_state,stv)
|
||||
|
||||
std::string region_tag;
|
||||
if (m_cart1)
|
||||
m_cart_reg[0] = memregion(region_tag.assign(m_cart1->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[0] = memregion(region_tag.assign(m_cart1->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
else
|
||||
m_cart_reg[0] = memregion("cart");
|
||||
if (m_cart2)
|
||||
m_cart_reg[1] = memregion(region_tag.assign(m_cart2->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[1] = memregion(region_tag.assign(m_cart2->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
else
|
||||
m_cart_reg[1] = nullptr;
|
||||
if (m_cart3)
|
||||
m_cart_reg[2] = memregion(region_tag.assign(m_cart3->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[2] = memregion(region_tag.assign(m_cart3->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
else
|
||||
m_cart_reg[2] = nullptr;
|
||||
if (m_cart4)
|
||||
m_cart_reg[3] = memregion(region_tag.assign(m_cart4->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_reg[3] = memregion(region_tag.assign(m_cart4->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
else
|
||||
m_cart_reg[3] = nullptr;
|
||||
|
||||
|
@ -239,7 +239,7 @@ private:
|
||||
void tutor_state::machine_start()
|
||||
{
|
||||
std::string region_tag;
|
||||
m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG));
|
||||
|
||||
m_tape_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tutor_state::tape_interrupt_handler),this));
|
||||
|
||||
|
@ -1514,9 +1514,9 @@ void m2_cde_device::device_start()
|
||||
{
|
||||
// Find our friend the BDA
|
||||
m_bda = downcast<m2_bda_device *>(machine().device("bda"));
|
||||
assert(m_bda != NULL);
|
||||
assert(m_bda != nullptr);
|
||||
|
||||
if (m_bda == NULL)
|
||||
if (m_bda == nullptr)
|
||||
throw device_missing_dependencies();
|
||||
|
||||
// Resolve callbacks
|
||||
|
@ -154,7 +154,7 @@ namespace esqpanel {
|
||||
m_to_send.put(c);
|
||||
const std::string &s = m_to_send.str();
|
||||
|
||||
for (auto iter: m_panels)
|
||||
for (const auto &iter: m_panels)
|
||||
{
|
||||
external_panel_ptr panel = iter.second;
|
||||
if (panel->send_display_data())
|
||||
@ -215,7 +215,7 @@ namespace esqpanel {
|
||||
}
|
||||
|
||||
// Echo the non-command message to any other connected panels that want it
|
||||
for (auto iter: m_panels)
|
||||
for (const auto &iter: m_panels)
|
||||
{
|
||||
external_panel_ptr other_panel = iter.second;
|
||||
if (other_panel != panel && (t & other_panel->send_message_types()) != 0)
|
||||
|
@ -1023,7 +1023,7 @@ void md_base_state::md2_pal(machine_config &config)
|
||||
|
||||
WRITE8_MEMBER(md_base_state::megadriv_tas_callback)
|
||||
{
|
||||
return; // writeback not allowed
|
||||
// writeback not allowed
|
||||
}
|
||||
|
||||
void md_base_state::megadriv_init_common()
|
||||
|
@ -1224,9 +1224,9 @@ void m2_te_device::setup_triangle(uint32_t flags)
|
||||
if ((vb.y - vc.y) < 0.0f) a |= 2;
|
||||
if ((vc.y - va.y) < 0.0f) a |= 1;
|
||||
|
||||
const se_vtx *v1 = NULL;
|
||||
const se_vtx *v2 = NULL;
|
||||
const se_vtx *v3 = NULL;
|
||||
const se_vtx *v1 = nullptr;
|
||||
const se_vtx *v2 = nullptr;
|
||||
const se_vtx *v3 = nullptr;
|
||||
|
||||
switch (a)
|
||||
{
|
||||
|
@ -730,7 +730,7 @@ void powervr2_device::tex_get_info(texinfo *t)
|
||||
// fprintf(stderr, "tex %d %d %d %d\n", t->pf, t->mode, pal_ram_ctrl, t->mipmapped);
|
||||
if(!t->textured)
|
||||
{
|
||||
t->r = NULL;
|
||||
t->r = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user