comparison Plugins/Samples/ServeFolders/Plugin.cpp @ 1384:d6971e18a324

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 May 2015 15:00:24 +0200
parents 3d76e26b3865
children b3119c32c920
comparison
equal deleted inserted replaced
1382:1cd2e09cb0e5 1384:d6971e18a324
220 } 220 }
221 221
222 std::string s = "<html><body><h1>Additional folders served by Orthanc</h1><ul>\n"; 222 std::string s = "<html><body><h1>Additional folders served by Orthanc</h1><ul>\n";
223 223
224 for (std::map<std::string, std::string>::const_iterator 224 for (std::map<std::string, std::string>::const_iterator
225 it = folders_.begin(); it != folders_.end(); it++) 225 it = folders_.begin(); it != folders_.end(); ++it)
226 { 226 {
227 s += "<li><a href=\"" + it->first + "/index.html\">" + it->first + "</li>\n"; 227 s += "<li><a href=\"" + it->first + "/index.html\">" + it->first + "</li>\n";
228 } 228 }
229 229
230 s += "</ul></body></html>"; 230 s += "</ul></body></html>";
268 { 268 {
269 Json::Value::Members members = configuration["ServeFolders"].getMemberNames(); 269 Json::Value::Members members = configuration["ServeFolders"].getMemberNames();
270 270
271 // Register the callback for each base URI 271 // Register the callback for each base URI
272 for (Json::Value::Members::const_iterator 272 for (Json::Value::Members::const_iterator
273 it = members.begin(); it != members.end(); it++) 273 it = members.begin(); it != members.end(); ++it)
274 { 274 {
275 const std::string& baseUri = *it; 275 const std::string& baseUri = *it;
276 const std::string path = configuration["ServeFolders"][*it].asString(); 276 const std::string path = configuration["ServeFolders"][*it].asString();
277 const std::string regex = "(" + baseUri + ")/(.*)"; 277 const std::string regex = "(" + baseUri + ")/(.*)";
278 278