add ignore_unused in resize to avoid warnings when assertions are disabled