1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-19 16:39:41 +00:00

Merge pull request #2181 from Capostrophic/boost

Get rid of Boost.Array
This commit is contained in:
Bret Curtis 2019-02-23 23:54:30 +01:00 committed by GitHub
commit 44920352ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 11 deletions

View file

@ -554,7 +554,7 @@ namespace MWGui
{
if (mGenerateClassStep == 10)
{
static boost::array<ClassPoint, 23> classes = { {
static std::array<ClassPoint, 23> classes = { {
{"Acrobat", {6, 2, 2}},
{"Agent", {6, 1, 3}},
{"Archer", {3, 5, 2}},

View file

@ -228,11 +228,9 @@ namespace MWGui
std::set<int> skillSet;
std::copy(major.begin(), major.end(), std::inserter(skillSet, skillSet.begin()));
std::copy(minor.begin(), minor.end(), std::inserter(skillSet, skillSet.begin()));
boost::array<ESM::Skill::SkillEnum, ESM::Skill::Length>::const_iterator end = ESM::Skill::sSkillIds.end();
mMiscSkills.clear();
for (boost::array<ESM::Skill::SkillEnum, ESM::Skill::Length>::const_iterator it = ESM::Skill::sSkillIds.begin(); it != end; ++it)
for (const int skill : ESM::Skill::sSkillIds)
{
int skill = *it;
if (skillSet.find(skill) == skillSet.end())
mMiscSkills.push_back(skill);
}

View file

@ -278,11 +278,9 @@ namespace MWGui
std::set<int> skillSet;
std::copy(major.begin(), major.end(), std::inserter(skillSet, skillSet.begin()));
std::copy(minor.begin(), minor.end(), std::inserter(skillSet, skillSet.begin()));
boost::array<ESM::Skill::SkillEnum, ESM::Skill::Length>::const_iterator end = ESM::Skill::sSkillIds.end();
mMiscSkills.clear();
for (boost::array<ESM::Skill::SkillEnum, ESM::Skill::Length>::const_iterator it = ESM::Skill::sSkillIds.begin(); it != end; ++it)
for (const int skill : ESM::Skill::sSkillIds)
{
int skill = *it;
if (skillSet.find(skill) == skillSet.end())
mMiscSkills.push_back(skill);
}

View file

@ -97,7 +97,7 @@ namespace ESM
"stealth_speechcraft.dds",
"stealth_handtohand.dds",
};
const boost::array<Skill::SkillEnum, Skill::Length> Skill::sSkillIds = {{
const std::array<Skill::SkillEnum, Skill::Length> Skill::sSkillIds = {{
Block,
Armorer,
MediumArmor,

View file

@ -1,10 +1,9 @@
#ifndef OPENMW_ESM_SKIL_H
#define OPENMW_ESM_SKIL_H
#include <array>
#include <string>
#include <boost/array.hpp>
#include "defs.hpp"
namespace ESM {
@ -76,7 +75,7 @@ struct Skill
static const std::string sSkillNames[Length];
static const std::string sSkillNameIds[Length];
static const std::string sIconNames[Length];
static const boost::array<SkillEnum, Length> sSkillIds;
static const std::array<SkillEnum, Length> sSkillIds;
void load(ESMReader &esm, bool &isDeleted);
void save(ESMWriter &esm, bool isDeleted = false) const;