Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
537aef39
Commit
537aef39
authored
Jan 18, 2024
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor: implement parse_key by using parse_key_list.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
699d2ec7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
17 deletions
+4
-17
audiowmark.cc
src/audiowmark.cc
+4
-17
No files found.
src/audiowmark.cc
View file @
537aef39
...
...
@@ -664,26 +664,13 @@ parse_key_list (ArgParser& ap)
Key
parse_key
(
ArgParser
&
ap
)
{
Key
key
;
// default initialized with zero key
string
s
;
int
i
;
int
have_key
=
0
;
if
(
ap
.
parse_opt
(
"--key"
,
s
))
{
have_key
++
;
key
.
load_key
(
s
);
}
if
(
ap
.
parse_opt
(
"--test-key"
,
i
))
{
have_key
++
;
key
.
set_test_key
(
i
);
}
if
(
have_key
>
1
)
auto
key_list
=
parse_key_list
(
ap
);
if
(
key_list
.
size
()
>
1
)
{
error
(
"audiowmark
: watermark key can at most be set once (--key / --test-key option)
\n
"
);
error
(
"audiowmark
%s: watermark key can at most be set once (--key / --test-key option)
\n
"
,
ap
.
command
().
c_str
()
);
exit
(
1
);
}
return
key
;
return
key
_list
[
0
]
;
}
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment