mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
support spaces in configargs
This commit is contained in:
parent
877d8ed142
commit
b8b72b658a
@ -357,10 +357,18 @@ void ConfigTable::MicroConfig(void)
|
|||||||
microconfig_cat->spam() << "separator character is: '" << sep
|
microconfig_cat->spam() << "separator character is: '" << sep
|
||||||
<< "'" << endl;
|
<< "'" << endl;
|
||||||
typedef std::vector<ConfigString> strvec;
|
typedef std::vector<ConfigString> strvec;
|
||||||
typedef Serialize::Deserializer<strvec, Serialize::StdExt<ConfigString> > deser;
|
strvec sv;
|
||||||
configconfig.erase(0, 1);
|
size_t q = 1;
|
||||||
deser ds(configconfig, sep);
|
size_t p = configconfig.find(sep, q);
|
||||||
strvec sv = ds;
|
while (p != ConfigString::npos) {
|
||||||
|
sv.push_back(configconfig.substr(q, p - q));
|
||||||
|
q = p + 1;
|
||||||
|
p = configconfig.find(sep, q);
|
||||||
|
}
|
||||||
|
if (q + 1 < configconfig.size()) {
|
||||||
|
sv.push_back(configconfig.substr(q));
|
||||||
|
}
|
||||||
|
|
||||||
if (microconfig_cat->is_spam())
|
if (microconfig_cat->is_spam())
|
||||||
microconfig_cat->spam()
|
microconfig_cat->spam()
|
||||||
<< "extracted vector of microconfig options" << endl;
|
<< "extracted vector of microconfig options" << endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user