https://codereview.appspot.com/583320043/diff/581420044/flower/file-name.cc
File flower/file-name.cc (right):

https://codereview.appspot.com/583320043/diff/581420044/flower/file-name.cc#newcode124
flower/file-name.cc:124: s += ext_;
On 2020/01/11 22:20:34, lemzwerg wrote:
any reason to use two lines?  In other files you use a single line for
similar
things.

s += EXTSEP; // append a char to s
s += ext_; // append a string to s

— vs. —

s += EXTSEP + ext_;
     \___________/
     make a string
\________________/
 append it to s

Either one could involve memory allocation, but I deemed it more
likely in the latter case.  I don't have reason to suspect this is a
performance bottlenck, but given that I had to touch the line, and
that it wasn't a major rewrite, I decided to try to improve it.

https://codereview.appspot.com/583320043/

Reply via email to