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
a2c4037a
Commit
a2c4037a
authored
Sep 26, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main: use nullptr instead of NULL
parent
d7b0073c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
Main.cxx
src/Main.cxx
+11
-11
No files found.
src/Main.cxx
View file @
a2c4037a
...
...
@@ -117,8 +117,8 @@ glue_daemonize_init(const struct options *options, Error &error)
if
(
pid_file
.
IsNull
()
&&
error
.
IsDefined
())
return
false
;
daemonize_init
(
config_get_string
(
CONF_USER
,
NULL
),
config_get_string
(
CONF_GROUP
,
NULL
),
daemonize_init
(
config_get_string
(
CONF_USER
,
nullptr
),
config_get_string
(
CONF_GROUP
,
nullptr
),
std
::
move
(
pid_file
));
if
(
options
->
kill
)
...
...
@@ -160,22 +160,22 @@ glue_db_init_and_load(void)
const
struct
config_param
*
param
=
config_get_param
(
CONF_DATABASE
);
const
struct
config_param
*
path
=
config_get_param
(
CONF_DB_FILE
);
if
(
param
!=
NULL
&&
path
!=
NULL
)
if
(
param
!=
nullptr
&&
path
!=
nullptr
)
g_message
(
"Found both 'database' and 'db_file' setting - ignoring the latter"
);
if
(
!
mapper_has_music_directory
())
{
if
(
param
!=
NULL
)
if
(
param
!=
nullptr
)
g_message
(
"Found database setting without "
"music_directory - disabling database"
);
if
(
path
!=
NULL
)
if
(
path
!=
nullptr
)
g_message
(
"Found db_file setting without "
"music_directory - disabling database"
);
return
true
;
}
struct
config_param
*
allocated
=
NULL
;
struct
config_param
*
allocated
=
nullptr
;
if
(
param
==
NULL
&&
path
!=
NULL
)
{
if
(
param
==
nullptr
&&
path
!=
nullptr
)
{
allocated
=
new
config_param
(
"database"
,
path
->
line
);
allocated
->
AddBlockParam
(
"path"
,
path
->
value
,
path
->
line
);
param
=
allocated
;
...
...
@@ -258,7 +258,7 @@ initialize_decoder_and_player(void)
unsigned
buffered_before_play
;
param
=
config_get_param
(
CONF_AUDIO_BUFFER_SIZE
);
if
(
param
!=
NULL
)
{
if
(
param
!=
nullptr
)
{
long
tmp
=
strtol
(
param
->
value
,
&
test
,
10
);
if
(
*
test
!=
'\0'
||
tmp
<=
0
||
tmp
==
LONG_MAX
)
FormatFatalError
(
"buffer size
\"
%s
\"
is not a "
...
...
@@ -277,7 +277,7 @@ initialize_decoder_and_player(void)
(
unsigned
long
)
buffer_size
);
param
=
config_get_param
(
CONF_BUFFER_BEFORE_PLAY
);
if
(
param
!=
NULL
)
{
if
(
param
!=
nullptr
)
{
perc
=
strtod
(
param
->
value
,
&
test
);
if
(
*
test
!=
'%'
||
perc
<
0
||
perc
>
100
)
{
FormatFatalError
(
"buffered before play
\"
%s
\"
is not "
...
...
@@ -360,7 +360,7 @@ int mpd_main(int argc, char *argv[])
#if !GLIB_CHECK_VERSION(2,32,0)
/* enable GLib's thread safety code */
g_thread_init
(
NULL
);
g_thread_init
(
nullptr
);
#endif
io_thread_init
();
...
...
@@ -464,7 +464,7 @@ int mpd_main(int argc, char *argv[])
if
(
create_db
)
{
/* the database failed to load: recreate the
database */
unsigned
job
=
update_enqueue
(
NULL
,
true
);
unsigned
job
=
update_enqueue
(
nullptr
,
true
);
if
(
job
==
0
)
FatalError
(
"directory update failed"
);
}
...
...
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