On 07/09/2011 5:06 PM, Richard Heck wrote:
I push an empty string to prevent extension_list_ from being empty,
because in Format.h we have

- std::string const & extension() const { return extension_; }
+ std::string const & extension() const { return extension_list_[0]; }

and extension_list_[0] would be an invalid address otherwise.

return extension_list_.empty() ? "" : extension_list_[0]?

rh


I tried exactly this and it throws a bunch of warnings: returning reference to temporary. That's when I went for the approach in the patch.

Julien

Reply via email to