aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFJob_argv.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-01-23 00:30:39 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-30 19:11:03 +0100
commite4905983d2751b4b0f7ae535cdffee2be7fbf36f (patch)
tree7e97f1f69b7d94ba136b87e12c39ab3cb95e9996 /libqpdf/QPDFJob_argv.cc
parente5edfc786f0dab9435379a7420c17695128466b2 (diff)
downloadqpdf-e4905983d2751b4b0f7ae535cdffee2be7fbf36f.tar.zst
QPDFJob: convert outfilename to shared pointer
Diffstat (limited to 'libqpdf/QPDFJob_argv.cc')
-rw-r--r--libqpdf/QPDFJob_argv.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/QPDFJob_argv.cc b/libqpdf/QPDFJob_argv.cc
index 0fb7d408..9ad02a02 100644
--- a/libqpdf/QPDFJob_argv.cc
+++ b/libqpdf/QPDFJob_argv.cc
@@ -72,7 +72,7 @@ ArgParser::argPositional(char* arg)
}
else if (o.outfilename == 0)
{
- o.outfilename = arg;
+ o.outfilename = QUtil::make_shared_cstr(arg);
}
else
{
@@ -1494,7 +1494,7 @@ ArgParser::doFinalChecks()
}
if (o.require_outfile && o.outfilename &&
- (strcmp(o.outfilename, "-") == 0))
+ (strcmp(o.outfilename.get(), "-") == 0))
{
if (o.split_pages)
{
@@ -1514,7 +1514,7 @@ ArgParser::doFinalChecks()
}
if ((! o.split_pages) &&
- QUtil::same_file(o.infilename.get(), o.outfilename))
+ QUtil::same_file(o.infilename.get(), o.outfilename.get()))
{
QTC::TC("qpdf", "qpdf same file error");
usage("input file and output file are the same;"