Hi Paul.

It looks like we can simplify this by omitting the first branch of the
if ... else ... else construct:

[[[
       if (delete_index == (arr->nelts - 1))
         {
           /* Deleting the last or only element in an array is easy. */
           apr_array_pop(arr);
         }
+      else if ((delete_index + elements_to_delete) == arr->nelts)
+        {
+          /* Delete the last ELEMENTS_TO_DELETE elements. */
+          arr->nelts -= elements_to_delete;
+        }
       else
]]]

Or is there some reason why 'apr_array_pop' is preferred in the N==1 case?

- Julian

Reply via email to