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
d8bcdca5
Commit
d8bcdca5
authored
Oct 28, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config/Block: rename GetBlockPath() to GetPath()
parent
f6f2a3b3
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
11 deletions
+11
-11
Block.cxx
src/config/Block.cxx
+3
-3
Block.hxx
src/config/Block.hxx
+2
-2
SimpleDatabasePlugin.cxx
src/db/plugins/simple/SimpleDatabasePlugin.cxx
+2
-2
SidplayDecoderPlugin.cxx
src/decoder/plugins/SidplayDecoderPlugin.cxx
+1
-1
WildmidiDecoderPlugin.cxx
src/decoder/plugins/WildmidiDecoderPlugin.cxx
+1
-1
FifoOutputPlugin.cxx
src/output/plugins/FifoOutputPlugin.cxx
+1
-1
RecorderOutputPlugin.cxx
src/output/plugins/RecorderOutputPlugin.cxx
+1
-1
No files found.
src/config/Block.cxx
View file @
d8bcdca5
...
@@ -91,7 +91,7 @@ ConfigBlock::GetBlockValue(const char *name, const char *default_value) const
...
@@ -91,7 +91,7 @@ ConfigBlock::GetBlockValue(const char *name, const char *default_value) const
}
}
AllocatedPath
AllocatedPath
ConfigBlock
::
Get
Block
Path
(
const
char
*
name
,
const
char
*
default_value
,
ConfigBlock
::
GetPath
(
const
char
*
name
,
const
char
*
default_value
,
Error
&
error
)
const
Error
&
error
)
const
{
{
assert
(
!
error
.
IsDefined
());
assert
(
!
error
.
IsDefined
());
...
@@ -119,9 +119,9 @@ ConfigBlock::GetBlockPath(const char *name, const char *default_value,
...
@@ -119,9 +119,9 @@ ConfigBlock::GetBlockPath(const char *name, const char *default_value,
}
}
AllocatedPath
AllocatedPath
ConfigBlock
::
Get
Block
Path
(
const
char
*
name
,
Error
&
error
)
const
ConfigBlock
::
GetPath
(
const
char
*
name
,
Error
&
error
)
const
{
{
return
Get
Block
Path
(
name
,
nullptr
,
error
);
return
GetPath
(
name
,
nullptr
,
error
);
}
}
int
int
...
...
src/config/Block.hxx
View file @
d8bcdca5
...
@@ -112,10 +112,10 @@ struct ConfigBlock {
...
@@ -112,10 +112,10 @@ struct ConfigBlock {
* Same as config_get_path(), but looks up the setting in the
* Same as config_get_path(), but looks up the setting in the
* specified block.
* specified block.
*/
*/
AllocatedPath
Get
Block
Path
(
const
char
*
name
,
const
char
*
default_value
,
AllocatedPath
GetPath
(
const
char
*
name
,
const
char
*
default_value
,
Error
&
error
)
const
;
Error
&
error
)
const
;
AllocatedPath
Get
Block
Path
(
const
char
*
name
,
Error
&
error
)
const
;
AllocatedPath
GetPath
(
const
char
*
name
,
Error
&
error
)
const
;
gcc_pure
gcc_pure
int
GetBlockValue
(
const
char
*
name
,
int
default_value
)
const
;
int
GetBlockValue
(
const
char
*
name
,
int
default_value
)
const
;
...
...
src/db/plugins/simple/SimpleDatabasePlugin.cxx
View file @
d8bcdca5
...
@@ -92,7 +92,7 @@ SimpleDatabase::Create(gcc_unused EventLoop &loop,
...
@@ -92,7 +92,7 @@ SimpleDatabase::Create(gcc_unused EventLoop &loop,
bool
bool
SimpleDatabase
::
Configure
(
const
ConfigBlock
&
block
,
Error
&
error
)
SimpleDatabase
::
Configure
(
const
ConfigBlock
&
block
,
Error
&
error
)
{
{
path
=
block
.
Get
Block
Path
(
"path"
,
error
);
path
=
block
.
GetPath
(
"path"
,
error
);
if
(
path
.
IsNull
())
{
if
(
path
.
IsNull
())
{
if
(
!
error
.
IsDefined
())
if
(
!
error
.
IsDefined
())
error
.
Set
(
simple_db_domain
,
error
.
Set
(
simple_db_domain
,
...
@@ -102,7 +102,7 @@ SimpleDatabase::Configure(const ConfigBlock &block, Error &error)
...
@@ -102,7 +102,7 @@ SimpleDatabase::Configure(const ConfigBlock &block, Error &error)
path_utf8
=
path
.
ToUTF8
();
path_utf8
=
path
.
ToUTF8
();
cache_path
=
block
.
Get
Block
Path
(
"cache_directory"
,
error
);
cache_path
=
block
.
GetPath
(
"cache_directory"
,
error
);
if
(
path
.
IsNull
()
&&
error
.
IsDefined
())
if
(
path
.
IsNull
()
&&
error
.
IsDefined
())
return
false
;
return
false
;
...
...
src/decoder/plugins/SidplayDecoderPlugin.cxx
View file @
d8bcdca5
...
@@ -86,7 +86,7 @@ sidplay_init(const ConfigBlock &block)
...
@@ -86,7 +86,7 @@ sidplay_init(const ConfigBlock &block)
{
{
/* read the songlengths database file */
/* read the songlengths database file */
Error
error
;
Error
error
;
const
auto
database_path
=
block
.
Get
Block
Path
(
"songlength_database"
,
error
);
const
auto
database_path
=
block
.
GetPath
(
"songlength_database"
,
error
);
if
(
!
database_path
.
IsNull
())
if
(
!
database_path
.
IsNull
())
songlength_database
=
sidplay_load_songlength_db
(
database_path
);
songlength_database
=
sidplay_load_songlength_db
(
database_path
);
else
if
(
error
.
IsDefined
())
else
if
(
error
.
IsDefined
())
...
...
src/decoder/plugins/WildmidiDecoderPlugin.cxx
View file @
d8bcdca5
...
@@ -42,7 +42,7 @@ wildmidi_init(const ConfigBlock &block)
...
@@ -42,7 +42,7 @@ wildmidi_init(const ConfigBlock &block)
{
{
Error
error
;
Error
error
;
const
AllocatedPath
path
=
const
AllocatedPath
path
=
block
.
Get
Block
Path
(
"config_file"
,
block
.
GetPath
(
"config_file"
,
"/etc/timidity/timidity.cfg"
,
"/etc/timidity/timidity.cfg"
,
error
);
error
);
if
(
path
.
IsNull
())
if
(
path
.
IsNull
())
...
...
src/output/plugins/FifoOutputPlugin.cxx
View file @
d8bcdca5
...
@@ -183,7 +183,7 @@ FifoOutput::Create(const ConfigBlock &block, Error &error)
...
@@ -183,7 +183,7 @@ FifoOutput::Create(const ConfigBlock &block, Error &error)
{
{
FifoOutput
*
fd
=
new
FifoOutput
();
FifoOutput
*
fd
=
new
FifoOutput
();
fd
->
path
=
block
.
Get
Block
Path
(
"path"
,
error
);
fd
->
path
=
block
.
GetPath
(
"path"
,
error
);
if
(
fd
->
path
.
IsNull
())
{
if
(
fd
->
path
.
IsNull
())
{
delete
fd
;
delete
fd
;
...
...
src/output/plugins/RecorderOutputPlugin.cxx
View file @
d8bcdca5
...
@@ -128,7 +128,7 @@ RecorderOutput::Configure(const ConfigBlock &block, Error &error)
...
@@ -128,7 +128,7 @@ RecorderOutput::Configure(const ConfigBlock &block, Error &error)
return
false
;
return
false
;
}
}
path
=
block
.
Get
Block
Path
(
"path"
,
error
);
path
=
block
.
GetPath
(
"path"
,
error
);
if
(
error
.
IsDefined
())
if
(
error
.
IsDefined
())
return
false
;
return
false
;
...
...
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