Typo with Initializer Lists

This commit is contained in:
Richer Larivière
2015-05-19 08:30:51 -04:00
parent d3b9e8c1c5
commit 9c3d78da33

View File

@@ -96,8 +96,8 @@ auto mos = std::vector<ModelObject>{mo1, mo2};
```c++ ```c++
// Don't do this // Don't do this
std::vector<ModelObject> mos; std::vector<ModelObject> mos;
mo.push_back(mo1); mos.push_back(mo1);
mo.push_back(mo2); mos.push_back(mo2);
``` ```
Initializer lists are significantly more efficient; reducing object copies and resizing of containers Initializer lists are significantly more efficient; reducing object copies and resizing of containers