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
76b7882f
Commit
76b7882f
authored
Jan 21, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ConfigData: rename struct block_param to BlockParam
parent
bf0ab2d4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+14
-14
Block.cxx
src/config/Block.cxx
+3
-3
Block.hxx
src/config/Block.hxx
+2
-2
ConfigData.cxx
src/config/ConfigData.cxx
+6
-6
ConfigData.hxx
src/config/ConfigData.hxx
+2
-2
ConfigFile.cxx
src/config/ConfigFile.cxx
+1
-1
No files found.
src/config/Block.cxx
View file @
76b7882f
...
...
@@ -25,7 +25,7 @@
#include <stdlib.h>
int
block_p
aram
::
GetIntValue
()
const
BlockP
aram
::
GetIntValue
()
const
{
char
*
endptr
;
long
value2
=
strtol
(
value
.
c_str
(),
&
endptr
,
0
);
...
...
@@ -36,7 +36,7 @@ block_param::GetIntValue() const
}
unsigned
block_p
aram
::
GetUnsignedValue
()
const
BlockP
aram
::
GetUnsignedValue
()
const
{
char
*
endptr
;
unsigned
long
value2
=
strtoul
(
value
.
c_str
(),
&
endptr
,
0
);
...
...
@@ -47,7 +47,7 @@ block_param::GetUnsignedValue() const
}
bool
block_p
aram
::
GetBoolValue
()
const
BlockP
aram
::
GetBoolValue
()
const
{
bool
value2
;
if
(
!
get_bool
(
value
.
c_str
(),
&
value2
))
...
...
src/config/Block.hxx
View file @
76b7882f
...
...
@@ -25,7 +25,7 @@
#include <string>
struct
block_p
aram
{
struct
BlockP
aram
{
std
::
string
name
;
std
::
string
value
;
int
line
;
...
...
@@ -37,7 +37,7 @@ struct block_param {
mutable
bool
used
;
gcc_nonnull_all
block_p
aram
(
const
char
*
_name
,
const
char
*
_value
,
int
_line
=-
1
)
BlockP
aram
(
const
char
*
_name
,
const
char
*
_value
,
int
_line
=-
1
)
:
name
(
_name
),
value
(
_value
),
line
(
_line
),
used
(
false
)
{}
gcc_pure
...
...
src/config/ConfigData.cxx
View file @
76b7882f
...
...
@@ -34,7 +34,7 @@ config_param::~config_param()
delete
next
;
}
const
block_p
aram
*
const
BlockP
aram
*
config_param
::
GetBlockParam
(
const
char
*
name
)
const
{
for
(
const
auto
&
i
:
block_params
)
{
...
...
@@ -50,7 +50,7 @@ config_param::GetBlockParam(const char *name) const
const
char
*
config_param
::
GetBlockValue
(
const
char
*
name
,
const
char
*
default_value
)
const
{
const
block_p
aram
*
bp
=
GetBlockParam
(
name
);
const
BlockP
aram
*
bp
=
GetBlockParam
(
name
);
if
(
bp
==
nullptr
)
return
default_value
;
...
...
@@ -66,7 +66,7 @@ config_param::GetBlockPath(const char *name, const char *default_value,
int
line2
=
line
;
const
char
*
s
;
const
block_p
aram
*
bp
=
GetBlockParam
(
name
);
const
BlockP
aram
*
bp
=
GetBlockParam
(
name
);
if
(
bp
!=
nullptr
)
{
line2
=
bp
->
line
;
s
=
bp
->
value
.
c_str
();
...
...
@@ -94,7 +94,7 @@ config_param::GetBlockPath(const char *name, Error &error) const
int
config_param
::
GetBlockValue
(
const
char
*
name
,
int
default_value
)
const
{
const
block_p
aram
*
bp
=
GetBlockParam
(
name
);
const
BlockP
aram
*
bp
=
GetBlockParam
(
name
);
if
(
bp
==
nullptr
)
return
default_value
;
...
...
@@ -104,7 +104,7 @@ config_param::GetBlockValue(const char *name, int default_value) const
unsigned
config_param
::
GetBlockValue
(
const
char
*
name
,
unsigned
default_value
)
const
{
const
block_p
aram
*
bp
=
GetBlockParam
(
name
);
const
BlockP
aram
*
bp
=
GetBlockParam
(
name
);
if
(
bp
==
nullptr
)
return
default_value
;
...
...
@@ -115,7 +115,7 @@ gcc_pure
bool
config_param
::
GetBlockValue
(
const
char
*
name
,
bool
default_value
)
const
{
const
block_p
aram
*
bp
=
GetBlockParam
(
name
);
const
BlockP
aram
*
bp
=
GetBlockParam
(
name
);
if
(
bp
==
nullptr
)
return
default_value
;
...
...
src/config/ConfigData.hxx
View file @
76b7882f
...
...
@@ -42,7 +42,7 @@ struct config_param {
unsigned
int
line
;
std
::
vector
<
block_p
aram
>
block_params
;
std
::
vector
<
BlockP
aram
>
block_params
;
/**
* This flag is false when nobody has queried the value of
...
...
@@ -78,7 +78,7 @@ struct config_param {
}
gcc_nonnull_all
gcc_pure
const
block_p
aram
*
GetBlockParam
(
const
char
*
_name
)
const
;
const
BlockP
aram
*
GetBlockParam
(
const
char
*
_name
)
const
;
gcc_pure
const
char
*
GetBlockValue
(
const
char
*
name
,
...
...
src/config/ConfigFile.cxx
View file @
76b7882f
...
...
@@ -67,7 +67,7 @@ config_read_name_value(struct config_param *param, char *input, unsigned line,
return
false
;
}
const
struct
block_p
aram
*
bp
=
param
->
GetBlockParam
(
name
);
const
BlockP
aram
*
bp
=
param
->
GetBlockParam
(
name
);
if
(
bp
!=
nullptr
)
{
error
.
Format
(
config_file_domain
,
"
\"
%s
\"
is duplicate, first defined on line %i"
,
...
...
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