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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
15 deletions
+15
-15
Block.cxx
src/config/Block.cxx
+4
-4
Block.hxx
src/config/Block.hxx
+3
-3
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
+3
-3
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,8 +91,8 @@ ConfigBlock::GetBlockValue(const char *name, const char *default_value) const
}
AllocatedPath
ConfigBlock
::
Get
Block
Path
(
const
char
*
name
,
const
char
*
default_value
,
Error
&
error
)
const
ConfigBlock
::
GetPath
(
const
char
*
name
,
const
char
*
default_value
,
Error
&
error
)
const
{
assert
(
!
error
.
IsDefined
());
...
...
@@ -119,9 +119,9 @@ ConfigBlock::GetBlockPath(const char *name, const char *default_value,
}
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
...
...
src/config/Block.hxx
View file @
d8bcdca5
...
...
@@ -112,10 +112,10 @@ struct ConfigBlock {
* Same as config_get_path(), but looks up the setting in the
* specified block.
*/
AllocatedPath
Get
Block
Path
(
const
char
*
name
,
const
char
*
default_value
,
Error
&
error
)
const
;
AllocatedPath
GetPath
(
const
char
*
name
,
const
char
*
default_value
,
Error
&
error
)
const
;
AllocatedPath
Get
Block
Path
(
const
char
*
name
,
Error
&
error
)
const
;
AllocatedPath
GetPath
(
const
char
*
name
,
Error
&
error
)
const
;
gcc_pure
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,
bool
SimpleDatabase
::
Configure
(
const
ConfigBlock
&
block
,
Error
&
error
)
{
path
=
block
.
Get
Block
Path
(
"path"
,
error
);
path
=
block
.
GetPath
(
"path"
,
error
);
if
(
path
.
IsNull
())
{
if
(
!
error
.
IsDefined
())
error
.
Set
(
simple_db_domain
,
...
...
@@ -102,7 +102,7 @@ SimpleDatabase::Configure(const ConfigBlock &block, Error &error)
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
())
return
false
;
...
...
src/decoder/plugins/SidplayDecoderPlugin.cxx
View file @
d8bcdca5
...
...
@@ -86,7 +86,7 @@ sidplay_init(const ConfigBlock &block)
{
/* read the songlengths database file */
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
())
songlength_database
=
sidplay_load_songlength_db
(
database_path
);
else
if
(
error
.
IsDefined
())
...
...
src/decoder/plugins/WildmidiDecoderPlugin.cxx
View file @
d8bcdca5
...
...
@@ -42,9 +42,9 @@ wildmidi_init(const ConfigBlock &block)
{
Error
error
;
const
AllocatedPath
path
=
block
.
Get
Block
Path
(
"config_file"
,
"/etc/timidity/timidity.cfg"
,
error
);
block
.
GetPath
(
"config_file"
,
"/etc/timidity/timidity.cfg"
,
error
);
if
(
path
.
IsNull
())
FatalError
(
error
);
...
...
src/output/plugins/FifoOutputPlugin.cxx
View file @
d8bcdca5
...
...
@@ -183,7 +183,7 @@ FifoOutput::Create(const ConfigBlock &block, Error &error)
{
FifoOutput
*
fd
=
new
FifoOutput
();
fd
->
path
=
block
.
Get
Block
Path
(
"path"
,
error
);
fd
->
path
=
block
.
GetPath
(
"path"
,
error
);
if
(
fd
->
path
.
IsNull
())
{
delete
fd
;
...
...
src/output/plugins/RecorderOutputPlugin.cxx
View file @
d8bcdca5
...
...
@@ -128,7 +128,7 @@ RecorderOutput::Configure(const ConfigBlock &block, Error &error)
return
false
;
}
path
=
block
.
Get
Block
Path
(
"path"
,
error
);
path
=
block
.
GetPath
(
"path"
,
error
);
if
(
error
.
IsDefined
())
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