Is there a significant difference between doing this...
if ( !myVector.empty()) {
for ( unsigned int i = 0; i < myVector.size(); ++i ) {
// do stuff
}
}
and this
for ( unsigned int i = 0; i < myVector.size(); ++i ) {
// do stuff
}
if the vector is empty? What is the cost of this on an empty vector?