mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-25 16:43:33 +00:00
Use reserve
on vectors for fixed loops
This is a bit useless, but has the merit of appeasing clang-tiday
This commit is contained in:
parent
4f99c060c3
commit
a15cca5763
@ -517,6 +517,7 @@ namespace MWGui
|
||||
std::vector<ESM::Skill::SkillEnum> CreateClassDialog::getMajorSkills() const
|
||||
{
|
||||
std::vector<ESM::Skill::SkillEnum> v;
|
||||
v.reserve(5);
|
||||
for(int i = 0; i < 5; i++)
|
||||
{
|
||||
v.push_back(mMajorSkill[i]->getSkillId());
|
||||
@ -527,6 +528,7 @@ namespace MWGui
|
||||
std::vector<ESM::Skill::SkillEnum> CreateClassDialog::getMinorSkills() const
|
||||
{
|
||||
std::vector<ESM::Skill::SkillEnum> v;
|
||||
v.reserve(5);
|
||||
for(int i=0; i < 5; i++)
|
||||
{
|
||||
v.push_back(mMinorSkill[i]->getSkillId());
|
||||
|
@ -191,6 +191,7 @@ namespace MWRender
|
||||
screenshotH = screenshotW; // use square resolution for planet mapping
|
||||
|
||||
std::vector<osg::ref_ptr<osg::Image>> images;
|
||||
images.reserve(6);
|
||||
|
||||
for (int i = 0; i < 6; ++i)
|
||||
images.push_back(new osg::Image);
|
||||
|
Loading…
x
Reference in New Issue
Block a user