Mercurial > hg > orthanc
comparison Core/ChunkedBuffer.cpp @ 656:08eca5d86aad
fixes to cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 04 Nov 2013 11:19:31 +0100 |
parents | bdd72233b105 |
children | 2d0a347e8cfc |
comparison
equal
deleted
inserted
replaced
655:93adc693cc60 | 656:08eca5d86aad |
---|---|
41 void ChunkedBuffer::Clear() | 41 void ChunkedBuffer::Clear() |
42 { | 42 { |
43 numBytes_ = 0; | 43 numBytes_ = 0; |
44 | 44 |
45 for (Chunks::iterator it = chunks_.begin(); | 45 for (Chunks::iterator it = chunks_.begin(); |
46 it != chunks_.end(); it++) | 46 it != chunks_.end(); ++it) |
47 { | 47 { |
48 delete *it; | 48 delete *it; |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
68 { | 68 { |
69 result.resize(numBytes_); | 69 result.resize(numBytes_); |
70 | 70 |
71 size_t pos = 0; | 71 size_t pos = 0; |
72 for (Chunks::iterator it = chunks_.begin(); | 72 for (Chunks::iterator it = chunks_.begin(); |
73 it != chunks_.end(); it++) | 73 it != chunks_.end(); ++it) |
74 { | 74 { |
75 assert(*it != NULL); | 75 assert(*it != NULL); |
76 | 76 |
77 size_t s = (*it)->size(); | 77 size_t s = (*it)->size(); |
78 if (s != 0) | 78 if (s != 0) |