(probably partly) fix list parsing implementations
This commit is contained in:
parent
a918f155b4
commit
bd0b1f3e97
1 changed files with 18 additions and 15 deletions
|
@ -248,35 +248,38 @@ inline void toLower(std::string &str) {
|
|||
#define VAR_LIST(section, name, type) \
|
||||
VAR_GENERIC(section, name,\
|
||||
std::vector<type> value;\
|
||||
)
|
||||
/*std::stringstream ss(line);\
|
||||
std::stringstream ss(line);\
|
||||
ssize_t line_len = line.size();\
|
||||
type val;\
|
||||
while (ss >> val) {\
|
||||
std::getline(configFile, line);\
|
||||
}\
|
||||
)*/
|
||||
configFile.seekg(configFile.tellg() - line_len);\
|
||||
)
|
||||
#define VAR_LIST_SEP(section, name, type, sep) \
|
||||
VAR_GENERIC(section, name,\
|
||||
std::vector<type> value;\
|
||||
)
|
||||
/*std::stringstream ss(line);\
|
||||
std::string val;\
|
||||
std::stringstream ss(line);\
|
||||
ssize_t line_len = line.size();\
|
||||
type type_val;\
|
||||
while (std::stringstream(val) >> type_val) {\
|
||||
std::getline(ss, val, ',');\
|
||||
for (std::string val; std::getline(ss, val, sep);) {\
|
||||
std::stringstream(val) >> type_val;\
|
||||
value.push_back(type_val);\
|
||||
}\
|
||||
)*/
|
||||
configFile.seekg(configFile.tellg() - line_len);\
|
||||
)
|
||||
#define VAR_LIST_SEP_P(section, name, type, sep, prefix) \
|
||||
VAR_GENERIC_P(section, name, prefix,\
|
||||
std::vector<type> value;\
|
||||
)
|
||||
/*std::stringstream ss(line);\
|
||||
std::string val;\
|
||||
std::stringstream ss(checkAndRemove(line, prefix));\
|
||||
ssize_t line_len = line.size();\
|
||||
type type_val;\
|
||||
while (std::stringstream(val) >> type_val) {\
|
||||
std::getline(ss, val, ',');\
|
||||
for (std::string val; std::getline(ss, val, sep);) {\
|
||||
std::stringstream(val) >> type_val;\
|
||||
value.push_back(type_val);\
|
||||
}\
|
||||
)*/
|
||||
configFile.seekg(configFile.tellg() - line_len);\
|
||||
)
|
||||
#define VAR_LIST_NUMBERED(section, name, type) \
|
||||
VAR_GENERIC(section, name,\
|
||||
std::vector<type> value;\
|
||||
|
|
Loading…
Reference in a new issue