Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
d588da69
Commit
d588da69
authored
Jan 17, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CommandLine: convert pointer to reference
parent
ec54a5c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
CommandLine.cxx
src/CommandLine.cxx
+6
-6
CommandLine.hxx
src/CommandLine.hxx
+1
-1
Main.cxx
src/Main.cxx
+1
-1
No files found.
src/CommandLine.cxx
View file @
d588da69
...
...
@@ -303,7 +303,7 @@ bool ConfigLoader::TryFile(const AllocatedPath &base_path,
}
void
ParseCommandLine
(
int
argc
,
char
**
argv
,
struct
options
*
options
)
ParseCommandLine
(
int
argc
,
char
**
argv
,
struct
options
&
options
)
{
bool
use_config_file
=
true
;
...
...
@@ -313,7 +313,7 @@ ParseCommandLine(int argc, char **argv, struct options *options)
while
((
option_index
=
parser
.
Next
())
>=
0
)
{
switch
(
Option
(
option_index
))
{
case
OPTION_KILL
:
options
->
kill
=
true
;
options
.
kill
=
true
;
break
;
case
OPTION_NO_CONFIG
:
...
...
@@ -321,16 +321,16 @@ ParseCommandLine(int argc, char **argv, struct options *options)
break
;
case
OPTION_NO_DAEMON
:
options
->
daemon
=
false
;
options
.
daemon
=
false
;
break
;
case
OPTION_STDOUT
:
case
OPTION_STDERR
:
options
->
log_stderr
=
true
;
options
.
log_stderr
=
true
;
break
;
case
OPTION_VERBOSE
:
options
->
verbose
=
true
;
options
.
verbose
=
true
;
break
;
case
OPTION_VERSION
:
...
...
@@ -344,7 +344,7 @@ ParseCommandLine(int argc, char **argv, struct options *options)
/* initialize the logging library, so the configuration file
parser can use it already */
log_early_init
(
options
->
verbose
);
log_early_init
(
options
.
verbose
);
if
(
!
use_config_file
)
{
LogDebug
(
cmdline_domain
,
...
...
src/CommandLine.hxx
View file @
d588da69
...
...
@@ -28,6 +28,6 @@ struct options {
};
void
ParseCommandLine
(
int
argc
,
char
**
argv
,
struct
options
*
options
);
ParseCommandLine
(
int
argc
,
char
**
argv
,
struct
options
&
options
);
#endif
src/Main.cxx
View file @
d588da69
...
...
@@ -469,7 +469,7 @@ try {
ReadConfigFile
(
config_path
);
}
#else
ParseCommandLine
(
argc
,
argv
,
&
options
);
ParseCommandLine
(
argc
,
argv
,
options
);
#endif
const
auto
config
=
LoadConfig
();
...
...
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