Skip to content

Commit

Permalink
micro optimization: avoid std::string copy
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgs committed Feb 13, 2020
1 parent 1394216 commit c400a73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions storage/innobase/log/log0recv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ struct file_name_t {
lsn_t enable_lsn;

/** Constructor */
file_name_t(std::string name_, bool deleted) :
name(name_), space(NULL), status(deleted ? DELETED: NORMAL),
file_name_t(std::string name_, bool deleted)
: name(std::move(name_)), space(NULL),
status(deleted ? DELETED: NORMAL),
size(0), enable_lsn(0) {}

/** Report a MLOG_INDEX_LOAD operation, meaning that
Expand Down

0 comments on commit c400a73

Please sign in to comment.