> On June 19, 2015, 9:17 a.m., Alexander Rukletsov wrote: > > Is it manual clean-up or you have fed the file to clang-format?
It was a mix of both. The function calls that fit in one line for example, I just stroked `Ctrl-K` to see if it fit, rather than trying it out manually. The incorrect indents I found out via manual inspection first then got `clang-format` to fix it. > On June 19, 2015, 9:17 a.m., Alexander Rukletsov wrote: > > src/slave/slave.cpp, line 1270 > > <https://reviews.apache.org/r/35635/diff/2/?file=987974#file987974line1270> > > > > Will the compiler cache the temporary and re-use it? Does it make sense > > to extract `completedFrameworks.end()` from the loop? This one actually had a bug that I addressed in [r35647](https://reviews.apache.org/r/35647/). We `erase` inside the loop, which invalidates every element after the erased element. But It looks like it might be the case for `circular_buffer` that `end` is not invalidated: > __Iterator Invalidation__. Invalidates iterators pointing to the erased > element and iterators pointing to the elements behind the erased element > (towards the end; __except iterators equal to end()__). As such, I think we can indeed save the end pointer. - Michael ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35635/#review88510 ----------------------------------------------------------- On June 19, 2015, 12:11 p.m., Michael Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35635/ > ----------------------------------------------------------- > > (Updated June 19, 2015, 12:11 p.m.) > > > Review request for mesos, Alexander Rukletsov, Benjamin Hindman, Ben Mahler, > and Till Toenshoff. > > > Repository: mesos > > > Description > ------- > > This patch includes fixes for incorrect formatting as well as > acceptable-but-can-be-improved formatting. > > > Diffs > ----- > > src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b > > Diff: https://reviews.apache.org/r/35635/diff/ > > > Testing > ------- > > `make check` > > > Thanks, > > Michael Park > >
