val.SetObject();
init.AddMember("parameters", val, init.GetAllocator());
- for(std::map<std::string,std::string>::iterator i = options.begin(); i != options.end(); i++) {
+ for(auto i = options.begin(); i != options.end(); i++) {
val = i->second.c_str();
init["parameters"].AddMember(i->first.c_str(), val, init.GetAllocator());
}
stringtok(parts, opts, ",");
// find out some options and parse them while we're at it
- for(std::string opt : parts) {
+ for(const auto& opt: parts) {
std::string key,val;
// make sure there is something else than air in the option...
if (opt.find_first_not_of(" ") == std::string::npos) continue;
JSON_ADD_MEMBER_DNSNAME(parameters, "name", name, query.GetAllocator());
JSON_ADD_MEMBER(parameters, "kind", kind.c_str(), query.GetAllocator());
val.SetArray();
- for(std::string value : meta) {
+ for(const auto& value: meta) {
val.PushBack(value.c_str(), query.GetAllocator());
}
parameters.AddMember("value", val, query.GetAllocator());
JSON_ADD_MEMBER(parameters, "domain_id", domain_id, query.GetAllocator());
JSON_ADD_MEMBER(parameters, "trxid", d_trxid, query.GetAllocator());
nts.SetArray();
- for(auto t: nonterm) {
+ for(const auto& t: nonterm) {
rapidjson::Value value(t.first.toString().c_str(), query.GetAllocator());
nts.PushBack(value, query.GetAllocator());
}
JSON_ADD_MEMBER(parameters, "trxid", d_trxid, query.GetAllocator());
nts.SetArray();
- for(auto t: nonterm) {
+ for(const auto& t: nonterm) {
rapidjson::Value value(t.first.toString().c_str(), query.GetAllocator());
nts.PushBack(value, query.GetAllocator());
}
val.SetObject();
init.AddMember("parameters", val, init.GetAllocator());
- for(std::map<std::string,std::string>::iterator i = options.begin(); i != options.end(); i++) {
+ for(auto i = options.begin(); i != options.end(); i++) {
val = i->second.c_str();
init["parameters"].AddMember(i->first.c_str(), val, init.GetAllocator());
}
val.SetObject();
init.AddMember("parameters", val, init.GetAllocator());
- for(std::map<std::string,std::string>::iterator i = options.begin(); i != options.end(); i++) {
+ for(auto i = options.begin(); i != options.end(); i++) {
val = i->second.c_str();
init["parameters"].AddMember(i->first.c_str(), val, init.GetAllocator());
}