Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtschump committed Nov 3, 2023
1 parent 916ecdb commit 6a6db64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CImg.h
Original file line number Diff line number Diff line change
Expand Up @@ -24630,7 +24630,7 @@ namespace cimg_library {
else cimg_forC(img,c) ptrd[c] = img(0,siz1,0,c); // Vector element
if (is_pop) { // Remove element from array
--siz;
if (img.height()>32 && siz<img.height()/6) // Reduce size of dynamic array
if (img.height()>32 && siz<img.height()/8) // Reduce size of dynamic array
img.resize(1,std::max(2*siz + 1,32),1,-100,0);
img[img._height - 1] = (T)cimg::uint2float(siz);
}
Expand Down Expand Up @@ -24747,7 +24747,7 @@ namespace cimg_library {
if (end<siz - 1) // Move remaining data in dynamic array
cimg_forC(img,c) std::memmove(img.data(0,start,0,c),img.data(0,end + 1,0,c),(siz - 1 - end)*sizeof(T));
siz-=end - start + 1;
if (img.height()>32 && siz<img.height()/6) // Reduce size of dynamic array
if (img.height()>32 && siz<img.height()/8) // Reduce size of dynamic array
img.resize(1,std::max(2*siz + 1,32),1,-100,0);
img[img._height - 1] = (T)cimg::uint2float(siz);
return cimg::type<double>::nan();
Expand Down

0 comments on commit 6a6db64

Please sign in to comment.