comparison Core/DicomFormat/DicomMap.cpp @ 656:08eca5d86aad

fixes to cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 Nov 2013 11:19:31 +0100
parents c2be0a0e049e
children 3bdb5db8e839 2d0a347e8cfc
comparison
equal deleted inserted replaced
655:93adc693cc60 656:08eca5d86aad
126 126
127 127
128 128
129 void DicomMap::Clear() 129 void DicomMap::Clear()
130 { 130 {
131 for (Map::iterator it = map_.begin(); it != map_.end(); it++) 131 for (Map::iterator it = map_.begin(); it != map_.end(); ++it)
132 { 132 {
133 delete it->second; 133 delete it->second;
134 } 134 }
135 135
136 map_.clear(); 136 map_.clear();
178 178
179 DicomMap* DicomMap::Clone() const 179 DicomMap* DicomMap::Clone() const
180 { 180 {
181 std::auto_ptr<DicomMap> result(new DicomMap); 181 std::auto_ptr<DicomMap> result(new DicomMap);
182 182
183 for (Map::const_iterator it = map_.begin(); it != map_.end(); it++) 183 for (Map::const_iterator it = map_.begin(); it != map_.end(); ++it)
184 { 184 {
185 result->map_.insert(std::make_pair(it->first, it->second->Clone())); 185 result->map_.insert(std::make_pair(it->first, it->second->Clone()));
186 } 186 }
187 187
188 return result.release(); 188 return result.release();