Replace path.items.size() == 0 by path.items.empty()