mirror of
https://github.com/holub/mame
synced 2025-07-10 04:05:16 +03:00
Minor core cleanups (nw)
- disound.cpp: Make a few more methods const - machine.cpp: c_str() is no longer needed with emu_file::open since it now takes a std::string
This commit is contained in:
parent
50a2e15b08
commit
ca88a7720b
@ -121,7 +121,7 @@ int device_sound_interface::outputs() const
|
||||
// on that stream
|
||||
//-------------------------------------------------
|
||||
|
||||
sound_stream *device_sound_interface::input_to_stream_input(int inputnum, int &stream_inputnum)
|
||||
sound_stream *device_sound_interface::input_to_stream_input(int inputnum, int &stream_inputnum) const
|
||||
{
|
||||
assert(inputnum >= 0);
|
||||
|
||||
@ -148,7 +148,7 @@ sound_stream *device_sound_interface::input_to_stream_input(int inputnum, int &s
|
||||
// on that stream
|
||||
//-------------------------------------------------
|
||||
|
||||
sound_stream *device_sound_interface::output_to_stream_output(int outputnum, int &stream_outputnum)
|
||||
sound_stream *device_sound_interface::output_to_stream_output(int outputnum, int &stream_outputnum) const
|
||||
{
|
||||
assert(outputnum >= 0);
|
||||
|
||||
|
@ -97,8 +97,8 @@ public:
|
||||
// helpers
|
||||
int inputs() const;
|
||||
int outputs() const;
|
||||
sound_stream *input_to_stream_input(int inputnum, int &stream_inputnum);
|
||||
sound_stream *output_to_stream_output(int outputnum, int &stream_outputnum);
|
||||
sound_stream *input_to_stream_input(int inputnum, int &stream_inputnum) const;
|
||||
sound_stream *output_to_stream_output(int outputnum, int &stream_outputnum) const;
|
||||
void set_input_gain(int inputnum, float gain);
|
||||
void set_output_gain(int outputnum, float gain);
|
||||
int inputnum_from_device(device_t &device, int outputnum = 0) const;
|
||||
|
@ -880,7 +880,7 @@ void running_machine::handle_saveload()
|
||||
|
||||
// open the file
|
||||
emu_file file(m_saveload_searchpath, openflags);
|
||||
auto const filerr = file.open(m_saveload_pending_file.c_str());
|
||||
auto const filerr = file.open(m_saveload_pending_file);
|
||||
if (filerr == osd_file::error::NONE)
|
||||
{
|
||||
const char *const opnamed = (m_saveload_schedule == saveload_schedule::LOAD) ? "loaded" : "saved";
|
||||
@ -1121,7 +1121,7 @@ void running_machine::nvram_load()
|
||||
for (device_nvram_interface &nvram : nvram_interface_iterator(root_device()))
|
||||
{
|
||||
emu_file file(options().nvram_directory(), OPEN_FLAG_READ);
|
||||
if (file.open(nvram_filename(nvram.device()).c_str()) == osd_file::error::NONE)
|
||||
if (file.open(nvram_filename(nvram.device())) == osd_file::error::NONE)
|
||||
{
|
||||
nvram.nvram_load(file);
|
||||
file.close();
|
||||
@ -1141,7 +1141,7 @@ void running_machine::nvram_save()
|
||||
for (device_nvram_interface &nvram : nvram_interface_iterator(root_device()))
|
||||
{
|
||||
emu_file file(options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
if (file.open(nvram_filename(nvram.device()).c_str()) == osd_file::error::NONE)
|
||||
if (file.open(nvram_filename(nvram.device())) == osd_file::error::NONE)
|
||||
{
|
||||
nvram.nvram_save(file);
|
||||
file.close();
|
||||
|
Loading…
Reference in New Issue
Block a user