Use empty() instead of size().