comparison OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp @ 5280:49477780e25a

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 15 Apr 2023 13:07:47 +0200
parents 0ea402b4d901
children 5fae323b11ed
comparison
equal deleted inserted replaced
5279:b9456dfde58a 5280:49477780e25a
251 } 251 }
252 252
253 // helper class to convert std::map of headers to the plugin SDK C structure 253 // helper class to convert std::map of headers to the plugin SDK C structure
254 class PluginHttpHeaders 254 class PluginHttpHeaders
255 { 255 {
256 private:
256 std::vector<const char*> headersKeys_; 257 std::vector<const char*> headersKeys_;
257 std::vector<const char*> headersValues_; 258 std::vector<const char*> headersValues_;
259
258 public: 260 public:
259 261 explicit PluginHttpHeaders(const std::map<std::string, std::string>& httpHeaders)
260 PluginHttpHeaders(const std::map<std::string, std::string>& httpHeaders)
261 { 262 {
262 for (std::map<std::string, std::string>::const_iterator 263 for (std::map<std::string, std::string>::const_iterator
263 it = httpHeaders.begin(); it != httpHeaders.end(); it++) 264 it = httpHeaders.begin(); it != httpHeaders.end(); ++it)
264 { 265 {
265 headersKeys_.push_back(it->first.c_str()); 266 headersKeys_.push_back(it->first.c_str());
266 headersValues_.push_back(it->second.c_str()); 267 headersValues_.push_back(it->second.c_str());
267 } 268 }
268 } 269 }