Skip to content

Commit 118b7b2

Browse files
committed
chdman: More PR feedback changes
1 parent 15bd154 commit 118b7b2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/tools/chdman.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ constexpr int MODE_GDI = 2;
9797
#define OPTION_INPUT "input"
9898
#define OPTION_OUTPUT "output"
9999
#define OPTION_OUTPUT_BIN "outputbin"
100-
#define OPTION_OUTPUT_SPLIT "split"
100+
#define OPTION_OUTPUT_SPLITBIN "splitbin"
101101
#define OPTION_OUTPUT_FORCE "force"
102102
#define OPTION_INPUT_START_BYTE "inputstartbyte"
103103
#define OPTION_INPUT_START_HUNK "inputstarthunk"
@@ -630,7 +630,7 @@ static const option_description s_options[] =
630630
{ OPTION_INPUT_PARENT, "ip", true, " <filename>: parent file name for input CHD" },
631631
{ OPTION_OUTPUT, "o", true, " <filename>: output file name" },
632632
{ OPTION_OUTPUT_BIN, "ob", true, " <filename>: output file name for binary data" },
633-
{ OPTION_OUTPUT_SPLIT, "sb", false, ": output one binary file per track" },
633+
{ OPTION_OUTPUT_SPLITBIN, "sb", false, ": output one binary file per track" },
634634
{ OPTION_OUTPUT_FORCE, "f", false, ": force overwriting an existing file" },
635635
{ OPTION_OUTPUT_PARENT, "op", true, " <filename>: parent file name for output CHD" },
636636
{ OPTION_INPUT_START_BYTE, "isb", true, " <offset>: starting byte offset within the input" },
@@ -785,7 +785,7 @@ static const command_description s_commands[] =
785785
{
786786
REQUIRED OPTION_OUTPUT,
787787
OPTION_OUTPUT_BIN,
788-
OPTION_OUTPUT_SPLIT,
788+
OPTION_OUTPUT_SPLITBIN,
789789
OPTION_OUTPUT_FORCE,
790790
REQUIRED OPTION_INPUT,
791791
OPTION_INPUT_PARENT,
@@ -2568,11 +2568,11 @@ static void do_extract_cd(parameters_map &params)
25682568
default_name.erase(chop, default_name.size());
25692569

25702570
// GDIs will always output as split bin
2571-
bool is_splitbin = mode == MODE_GDI || params.find(OPTION_OUTPUT_SPLIT) != params.end();
2571+
bool is_splitbin = mode == MODE_GDI || params.find(OPTION_OUTPUT_SPLITBIN) != params.end();
25722572
if (!is_splitbin && cdrom->is_gdrom() && mode == MODE_CUEBIN)
25732573
{
25742574
// GD-ROM cue/bin is in Redump format which should always be split by tracks
2575-
util::stream_format(std::cout, "Warning: --%s is required for this specific combination of input disc type and output format, enabling automatically\n", OPTION_OUTPUT_SPLIT);
2575+
util::stream_format(std::cout, "Warning: --%s is required for this specific combination of input disc type and output format, enabling automatically\n", OPTION_OUTPUT_SPLITBIN);
25762576
is_splitbin = true;
25772577
}
25782578

@@ -2599,15 +2599,15 @@ static void do_extract_cd(parameters_map &params)
25992599
{
26002600
output_bin_file_str = output_bin_file_fnd->second;
26012601

2602-
chop = (*output_bin_file_str).find_last_of('.');
2602+
chop = output_bin_file_str->find_last_of('.');
26032603
if (chop != std::string::npos)
26042604
{
2605-
output_bin_file_ext = (*output_bin_file_str).substr(chop, (*output_bin_file_str).size() - chop);
2606-
(*output_bin_file_str).erase(chop, (*output_bin_file_str).size());
2605+
output_bin_file_ext = output_bin_file_str->substr(chop, output_bin_file_str->size() - chop);
2606+
output_bin_file_str->erase(chop, output_bin_file_str->size());
26072607
}
26082608
}
26092609

2610-
if ((*output_bin_file_str).find('"') != std::string::npos || output_bin_file_ext.find('"') != std::string::npos)
2610+
if (output_bin_file_str->find('"') != std::string::npos || output_bin_file_ext.find('"') != std::string::npos)
26112611
report_error(1, "Output bin filename (%s%s) must not contain quotation marks", *output_bin_file_str, output_bin_file_ext);
26122612

26132613
// print some info
@@ -2690,7 +2690,7 @@ static void do_extract_cd(parameters_map &params)
26902690

26912691
if (is_splitbin && !found_track_variable)
26922692
{
2693-
report_error(1, "A track number variable (%%t) must be specified in the output bin filename when --%s is enabled\n", OPTION_OUTPUT_SPLIT);
2693+
report_error(1, "A track number variable (%%t) must be specified in the output bin filename when --%s is enabled\n", OPTION_OUTPUT_SPLITBIN);
26942694
}
26952695

26962696
// verify output BIN file doesn't exist
@@ -2913,7 +2913,7 @@ static void do_extract_cd(parameters_map &params)
29132913
// delete the output files
29142914
output_bin_file.reset();
29152915
output_toc_file.reset();
2916-
for (auto output_bin_filename : output_bin_filenames)
2916+
for (auto const &output_bin_filename : output_bin_filenames)
29172917
osd_file::remove(output_bin_filename);
29182918
osd_file::remove(*output_file_str->second);
29192919
throw;

0 commit comments

Comments
 (0)