> On Feb. 4, 2015, 1:32 a.m., Jie Yu wrote: > > src/slave/paths.cpp, line 453 > > <https://reviews.apache.org/r/30531/diff/1/?file=844643#file844643line453> > > > > const string& directory > > Dominic Hamon wrote: > the function returns a string by value. there's no improvement here using > a const ref (the copy will be elided). using a plan string is much clearer i > think.
Does it save a call to the copy constructor (from the temp object to 'directory')? Or the compiler will optimize it? - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30531/#review70885 ----------------------------------------------------------- On Feb. 4, 2015, 5:22 p.m., Dominic Hamon wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30531/ > ----------------------------------------------------------- > > (Updated Feb. 4, 2015, 5:22 p.m.) > > > Review request for mesos and Jie Yu. > > > Bugs: MESOS-2314 > https://issues.apache.org/jira/browse/MESOS-2314 > > > Repository: mesos > > > Description > ------- > > Remove strings::format and unnecessary constants from paths > > > Diffs > ----- > > src/slave/paths.hpp 4d6897f9eebcd6852f0223bae23a29729a42e750 > src/slave/paths.cpp fe951abac1254748dbd5bdd81b7e50da75afad6d > > Diff: https://reviews.apache.org/r/30531/diff/ > > > Testing > ------- > > > Thanks, > > Dominic Hamon > >
