ConfigData: remove C++ checks
This commit is contained in:
parent
d1e7b4e381
commit
acd742d225
@ -24,13 +24,9 @@
|
|||||||
#include "gerror.h"
|
#include "gerror.h"
|
||||||
#include "gcc.h"
|
#include "gcc.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
|
|
||||||
struct block_param {
|
struct block_param {
|
||||||
std::string name;
|
std::string name;
|
||||||
@ -48,8 +44,6 @@ struct block_param {
|
|||||||
:name(_name), value(_value), line(_line), used(false) {}
|
:name(_name), value(_value), line(_line), used(false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct config_param {
|
struct config_param {
|
||||||
/**
|
/**
|
||||||
* The next config_param with the same name. The destructor
|
* The next config_param with the same name. The destructor
|
||||||
@ -60,7 +54,6 @@ struct config_param {
|
|||||||
char *value;
|
char *value;
|
||||||
unsigned int line;
|
unsigned int line;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
std::vector<block_param> block_params;
|
std::vector<block_param> block_params;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,21 +82,12 @@ struct config_param {
|
|||||||
|
|
||||||
gcc_nonnull_all gcc_pure
|
gcc_nonnull_all gcc_pure
|
||||||
const block_param *GetBlockParam(const char *_name) const;
|
const block_param *GetBlockParam(const char *_name) const;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
|
|
||||||
struct ConfigData {
|
struct ConfigData {
|
||||||
std::array<config_param *, std::size_t(CONF_MAX)> params;
|
std::array<config_param *, std::size_t(CONF_MAX)> params;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gcc_pure
|
gcc_pure
|
||||||
const char *
|
const char *
|
||||||
config_get_block_string(const struct config_param *param, const char *name,
|
config_get_block_string(const struct config_param *param, const char *name,
|
||||||
@ -133,8 +117,4 @@ bool
|
|||||||
config_get_block_bool(const struct config_param *param, const char *name,
|
config_get_block_bool(const struct config_param *param, const char *name,
|
||||||
bool default_value);
|
bool default_value);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user