Simplify std::vector code.