Repository: mesos Updated Branches: refs/heads/master e999beb18 -> 5eaa702c2
Fixed a code sample in the style guide which violated the "do not capture temporaries by reference" rule. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5eaa702c Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5eaa702c Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5eaa702c Branch: refs/heads/master Commit: 5eaa702c2da8a2922be35d8332ee4bf92a3433c7 Parents: e999beb Author: Michael Park <[email protected]> Authored: Fri Sep 18 16:30:52 2015 -0400 Committer: Michael Park <[email protected]> Committed: Fri Sep 18 16:33:13 2015 -0400 ---------------------------------------------------------------------- docs/mesos-c++-style-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/5eaa702c/docs/mesos-c++-style-guide.md ---------------------------------------------------------------------- diff --git a/docs/mesos-c++-style-guide.md b/docs/mesos-c++-style-guide.md index f1ed32a..570ea68 100644 --- a/docs/mesos-c++-style-guide.md +++ b/docs/mesos-c++-style-guide.md @@ -236,9 +236,9 @@ We support C++11 and require GCC 4.8+ or Clang 3.5+ compilers. The whitelist of ~~~{.cpp} // 1: OK. -const auto& i = values.find(keys.front()); +const auto i = values.find(keys.front()); // Compare with -const typename map::iterator& i = values.find(keys.front()); +const typename map::iterator i = values.find(keys.front()); // 2: OK. auto names = shared_ptr<list<string>>(new list<string>());
