comparison OrthancServer/OrthancFindRequestHandler.cpp @ 716:cf6e761e7da5

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Feb 2014 11:49:02 +0100
parents 6a1dbba0cca7
children 3596177682a9
comparison
equal deleted inserted replaced
715:78239878727a 716:cf6e761e7da5
299 299
300 static void ListToSet(std::set<std::string>& target, 300 static void ListToSet(std::set<std::string>& target,
301 const std::list<std::string>& source) 301 const std::list<std::string>& source)
302 { 302 {
303 for (std::list<std::string>::const_iterator 303 for (std::list<std::string>::const_iterator
304 it = source.begin(); it != source.end(); it++) 304 it = source.begin(); it != source.end(); ++it)
305 { 305 {
306 target.insert(*it); 306 target.insert(*it);
307 } 307 }
308 } 308 }
309 309
322 322
323 std::set<std::string> tmp = filtered_; 323 std::set<std::string> tmp = filtered_;
324 filtered_.clear(); 324 filtered_.clear();
325 325
326 for (std::set<std::string>::const_iterator 326 for (std::set<std::string>::const_iterator
327 it = tmp.begin(); it != tmp.end(); it++) 327 it = tmp.begin(); it != tmp.end(); ++it)
328 { 328 {
329 if (s.find(*it) != s.end()) 329 if (s.find(*it) != s.end())
330 { 330 {
331 filtered_.insert(*it); 331 filtered_.insert(*it);
332 } 332 }
364 std::set<std::string> tmp = filtered_; 364 std::set<std::string> tmp = filtered_;
365 365
366 filtered_.clear(); 366 filtered_.clear();
367 367
368 for (std::set<std::string>::const_iterator 368 for (std::set<std::string>::const_iterator
369 it = tmp.begin(); it != tmp.end(); it++) 369 it = tmp.begin(); it != tmp.end(); ++it)
370 { 370 {
371 std::list<std::string> children; 371 std::list<std::string> children;
372 index_.GetChildren(children, *it); 372 index_.GetChildren(children, *it);
373 ListToSet(filtered_, children); 373 ListToSet(filtered_, children);
374 } 374 }
398 resources.clear(); 398 resources.clear();
399 399
400 if (isFilterApplied_) 400 if (isFilterApplied_)
401 { 401 {
402 for (std::set<std::string>::const_iterator 402 for (std::set<std::string>::const_iterator
403 it = filtered_.begin(); it != filtered_.end(); it++) 403 it = filtered_.begin(); it != filtered_.end(); ++it)
404 { 404 {
405 resources.push_back(*it); 405 resources.push_back(*it);
406 } 406 }
407 } 407 }
408 else 408 else