Merge pull request #2342 from neheb/res

VImage: reserve vector before push_back loop
This commit is contained in:
John Cupitt 2021-07-11 12:36:57 +01:00 committed by GitHub
commit 3732751bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -767,6 +767,7 @@ std::vector<VImage>
VImage::bandsplit( VOption *options ) const
{
std::vector<VImage> b;
b.reserve(bands());
for( int i = 0; i < bands(); i++ )
b.push_back( extract_band( i ) );