compressors: added mkup_gain reset, fixed smooth_only
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / arraylist.h
index 602557f53f38e3249595582f0ae4003c4b69c84b..2fade202d754f5b8ce79ae627ec397366197e5c8 100644 (file)
@@ -47,14 +47,14 @@ public:
                remove();
        }
        void remove_block(int i, int n) {
-               if( i >= total ) return;
-               for( n+=i; n<total; ) values[i++] = values[n++];
+               if( i >= total || !n ) return;
+               for( n+=i; n<total; ++i,++n ) values[i] = values[n];
                total = i;
        }
        void remove_object_block(int i, int n) {
-               if( i >= total ) return;
-               for( n+=i; n<total; ) { del_value(i); values[i++] = values[n++]; }
-               for( n=i; n<total; ++n ) del_value(n);
+               if( i >= total || !n ) return;
+               for( int j=i,k=n; --k>=0 && j<total; ++j ) del_value(j);
+               for( n+=i; n<total; ++i,++n ) values[i] = values[n];
                total = i;
        }
        void remove(TYPE value) {