You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jojy Varghese <jo...@mesosphere.io> on 2015/10/08 21:30:21 UTC
Review Request 39141: Store: minor style changes
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39141/
-----------------------------------------------------------
Review request for mesos and Timothy Chen.
Repository: mesos
Description
-------
Store: minor style changes
Diffs
-----
src/slave/containerizer/provisioner/docker/store.cpp cbb67686d45513f0395a0cf1bc5c43cb4935adae
Diff: https://reviews.apache.org/r/39141/diff/
Testing
-------
make check.
Thanks,
Jojy Varghese
Re: Review Request 39141: Store: minor style changes
Posted by Anand Mazumdar <ma...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39141/#review101964
-----------------------------------------------------------
Ship it!
Ship It!
- Anand Mazumdar
On Oct. 8, 2015, 9:51 p.m., Jojy Varghese wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39141/
> -----------------------------------------------------------
>
> (Updated Oct. 8, 2015, 9:51 p.m.)
>
>
> Review request for mesos and Timothy Chen.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Store: minor style changes
>
>
> Diffs
> -----
>
> src/slave/containerizer/provisioner/docker/store.cpp cbb67686d45513f0395a0cf1bc5c43cb4935adae
>
> Diff: https://reviews.apache.org/r/39141/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jojy Varghese
>
>
Re: Review Request 39141: Store: minor style changes
Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39141/#review101971
-----------------------------------------------------------
Ship it!
Ship It!
- Timothy Chen
On Oct. 8, 2015, 9:51 p.m., Jojy Varghese wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39141/
> -----------------------------------------------------------
>
> (Updated Oct. 8, 2015, 9:51 p.m.)
>
>
> Review request for mesos and Timothy Chen.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Store: minor style changes
>
>
> Diffs
> -----
>
> src/slave/containerizer/provisioner/docker/store.cpp cbb67686d45513f0395a0cf1bc5c43cb4935adae
>
> Diff: https://reviews.apache.org/r/39141/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jojy Varghese
>
>
Re: Review Request 39141: Store: minor style changes
Posted by Jojy Varghese <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39141/
-----------------------------------------------------------
(Updated Oct. 8, 2015, 9:51 p.m.)
Review request for mesos and Timothy Chen.
Changes
-------
reverted back emplace_back. There is a ton of information of why emplace_back is preferred([1], [2]) but we might need a general agreement on the adopting the usage.
1] http://www.gahcep.com/cpp-internals-stl-vector-part-2/
2] http://stackoverflow.com/questions/26860749/efficiency-of-c11-push-back-with-stdmove-versus-emplace-back-for-already
Repository: mesos
Description
-------
Store: minor style changes
Diffs (updated)
-----
src/slave/containerizer/provisioner/docker/store.cpp cbb67686d45513f0395a0cf1bc5c43cb4935adae
Diff: https://reviews.apache.org/r/39141/diff/
Testing
-------
make check.
Thanks,
Jojy Varghese
Re: Review Request 39141: Store: minor style changes
Posted by Jojy Varghese <jo...@mesosphere.io>.
> On Oct. 8, 2015, 7:40 p.m., Anand Mazumdar wrote:
> > src/slave/containerizer/provisioner/docker/store.cpp, line 202
> > <https://reviews.apache.org/r/39141/diff/1/?file=1093307#file1093307line202>
> >
> > In this particular case, `push_back` would also do a `std::move` for a temporary object and I wonder why do we even need `emplace_back` here ?
> >
> > I even don't know if an overload like `emplace_back(T&& value)` even existed and how does it compile even ?
> >
> > http://en.cppreference.com/w/cpp/container/vector/emplace_back
post c++11, emplace_back is the preferred way to insert into containers, especially when dealing with temporaries. The only reason to use push_back is if you want to support pre-c++11 compilers.
- Jojy
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39141/#review101951
-----------------------------------------------------------
On Oct. 8, 2015, 7:30 p.m., Jojy Varghese wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39141/
> -----------------------------------------------------------
>
> (Updated Oct. 8, 2015, 7:30 p.m.)
>
>
> Review request for mesos and Timothy Chen.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Store: minor style changes
>
>
> Diffs
> -----
>
> src/slave/containerizer/provisioner/docker/store.cpp cbb67686d45513f0395a0cf1bc5c43cb4935adae
>
> Diff: https://reviews.apache.org/r/39141/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jojy Varghese
>
>
Re: Review Request 39141: Store: minor style changes
Posted by Anand Mazumdar <ma...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39141/#review101951
-----------------------------------------------------------
src/slave/containerizer/provisioner/docker/store.cpp (line 202)
<https://reviews.apache.org/r/39141/#comment159462>
In this particular case, `push_back` would also do a `std::move` for a temporary object and I wonder why do we even need `emplace_back` here ?
I even don't know if an overload like `emplace_back(T&& value)` even existed and how does it compile even ?
http://en.cppreference.com/w/cpp/container/vector/emplace_back
- Anand Mazumdar
On Oct. 8, 2015, 7:30 p.m., Jojy Varghese wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39141/
> -----------------------------------------------------------
>
> (Updated Oct. 8, 2015, 7:30 p.m.)
>
>
> Review request for mesos and Timothy Chen.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Store: minor style changes
>
>
> Diffs
> -----
>
> src/slave/containerizer/provisioner/docker/store.cpp cbb67686d45513f0395a0cf1bc5c43cb4935adae
>
> Diff: https://reviews.apache.org/r/39141/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jojy Varghese
>
>