summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-01-21 21:12:54 +0100
committerMax Kellermann <max@duempel.org>2015-01-21 21:18:25 +0100
commit76b7882f3324bb892a9ccc874e1bdacfd72e7b98 (patch)
treebf9679518ecb502322b7bbc17e324991f7a9de5d /src/config
parentbf0ab2d44c38064624778d5fb6d868cea7cb4e1a (diff)
ConfigData: rename struct block_param to BlockParam
Diffstat (limited to 'src/config')
-rw-r--r--src/config/Block.cxx6
-rw-r--r--src/config/Block.hxx4
-rw-r--r--src/config/ConfigData.cxx12
-rw-r--r--src/config/ConfigData.hxx4
-rw-r--r--src/config/ConfigFile.cxx2
5 files changed, 14 insertions, 14 deletions
diff --git a/src/config/Block.cxx b/src/config/Block.cxx
index ff5a426f8..ba26c560f 100644
--- a/src/config/Block.cxx
+++ b/src/config/Block.cxx
@@ -25,7 +25,7 @@
#include <stdlib.h>
int
-block_param::GetIntValue() const
+BlockParam::GetIntValue() const
{
char *endptr;
long value2 = strtol(value.c_str(), &endptr, 0);
@@ -36,7 +36,7 @@ block_param::GetIntValue() const
}
unsigned
-block_param::GetUnsignedValue() const
+BlockParam::GetUnsignedValue() const
{
char *endptr;
unsigned long value2 = strtoul(value.c_str(), &endptr, 0);
@@ -47,7 +47,7 @@ block_param::GetUnsignedValue() const
}
bool
-block_param::GetBoolValue() const
+BlockParam::GetBoolValue() const
{
bool value2;
if (!get_bool(value.c_str(), &value2))
diff --git a/src/config/Block.hxx b/src/config/Block.hxx
index 1295c7289..c2194eff9 100644
--- a/src/config/Block.hxx
+++ b/src/config/Block.hxx
@@ -25,7 +25,7 @@
#include <string>
-struct block_param {
+struct BlockParam {
std::string name;
std::string value;
int line;
@@ -37,7 +37,7 @@ struct block_param {
mutable bool used;
gcc_nonnull_all
- block_param(const char *_name, const char *_value, int _line=-1)
+ BlockParam(const char *_name, const char *_value, int _line=-1)
:name(_name), value(_value), line(_line), used(false) {}
gcc_pure
diff --git a/src/config/ConfigData.cxx b/src/config/ConfigData.cxx
index 42f93972c..5d0b61df0 100644
--- a/src/config/ConfigData.cxx
+++ b/src/config/ConfigData.cxx
@@ -34,7 +34,7 @@ config_param::~config_param()
delete next;
}
-const block_param *
+const BlockParam *
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_param *bp = GetBlockParam(name);
+ const BlockParam *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_param *bp = GetBlockParam(name);
+ const BlockParam *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_param *bp = GetBlockParam(name);
+ const BlockParam *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_param *bp = GetBlockParam(name);
+ const BlockParam *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_param *bp = GetBlockParam(name);
+ const BlockParam *bp = GetBlockParam(name);
if (bp == nullptr)
return default_value;
diff --git a/src/config/ConfigData.hxx b/src/config/ConfigData.hxx
index 332634646..1f7e61b6f 100644
--- a/src/config/ConfigData.hxx
+++ b/src/config/ConfigData.hxx
@@ -42,7 +42,7 @@ struct config_param {
unsigned int line;
- std::vector<block_param> block_params;
+ std::vector<BlockParam> 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_param *GetBlockParam(const char *_name) const;
+ const BlockParam *GetBlockParam(const char *_name) const;
gcc_pure
const char *GetBlockValue(const char *name,
diff --git a/src/config/ConfigFile.cxx b/src/config/ConfigFile.cxx
index 75b3c7851..605adb430 100644
--- a/src/config/ConfigFile.cxx
+++ b/src/config/ConfigFile.cxx
@@ -67,7 +67,7 @@ config_read_name_value(struct config_param *param, char *input, unsigned line,
return false;
}
- const struct block_param *bp = param->GetBlockParam(name);
+ const BlockParam *bp = param->GetBlockParam(name);
if (bp != nullptr) {
error.Format(config_file_domain,
"\"%s\" is duplicate, first defined on line %i",