Removes another unused dependency, performance improvements for MoveData
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2019-12-31 12:35:48 +01:00
parent 4fd8e8a757
commit f79c4fba04
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 6 additions and 6 deletions

View File

@ -1,11 +1,11 @@
#include "MoveData.hpp"
#include <unitypes.h>
PkmnLib::Library::MoveData::MoveData(std::string name, std::string type, PkmnLib::Library::MoveCategory category,
uint8_t power, uint8_t accuracy, uint8_t baseUsage,
CreatureLib::Library::AttackTarget target, uint8_t priority,
#include <utility>
PkmnLib::Library::MoveData::MoveData(const std::string& name, const std::string& type,
PkmnLib::Library::MoveCategory category, uint8_t power, uint8_t accuracy,
uint8_t baseUsage, CreatureLib::Library::AttackTarget target, uint8_t priority,
std::unordered_set<std::string> flags)
: AttackData(name, type, static_cast<CreatureLib::Library::AttackCategory>(category), power, accuracy, baseUsage,
target, priority, flags) {}
target, priority, std::move(flags)) {}
PkmnLib::Library::MoveCategory PkmnLib::Library::MoveData::GetCategory() const {
return static_cast<PkmnLib::Library::MoveCategory>(AttackData::GetCategory());

View File

@ -9,7 +9,7 @@ namespace PkmnLib::Library {
private:
public:
MoveData(std::string name, std::string type, PkmnLib::Library::MoveCategory category, uint8_t power,
MoveData(const std::string& name, const std::string& type, PkmnLib::Library::MoveCategory category, uint8_t power,
uint8_t accuracy, uint8_t baseUsage, CreatureLib::Library::AttackTarget target, uint8_t priority,
std::unordered_set<std::string> flags);