Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "ios/web/navigation/navigation_item_impl_list.h" | |
| 6 | |
| 7 #import "ios/web/navigation/navigation_item_impl.h" | |
| 8 | |
| 9 namespace web { | |
| 10 | |
| 11 ScopedNavigationItemImplList CreateScopedNavigationItemImplList( | |
| 12 ScopedNavigationItemList scoped_item_list) { | |
| 13 ScopedNavigationItemImplList list; | |
|
Eugene But (OOO till 7-30)
2017/02/03 23:33:33
Construct with size?
kkhorimoto
2017/02/04 02:45:30
Done.
| |
| 14 for (size_t index = 0; index < scoped_item_list.size(); ++index) { | |
| 15 std::unique_ptr<NavigationItemImpl> scoped_item_impl( | |
| 16 static_cast<NavigationItemImpl*>(scoped_item_list[index].release())); | |
| 17 list.push_back(std::move(scoped_item_impl)); | |
|
Eugene But (OOO till 7-30)
2017/02/03 23:33:33
emplace_back ?
kkhorimoto
2017/02/04 02:45:30
Judging by C++ documentation, it seems that using
| |
| 18 } | |
| 19 return list; | |
| 20 } | |
| 21 | |
| 22 } // namespace web | |
| OLD | NEW |