mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-25 12:14:46 +02:00
remove trivial manual implementation of assignment operator
fixes clang warning: Definition of implicit copy constructor for 'RiverType' is deprecated because it has a user-provided copy assignment operator
This commit is contained in:
parent
35f2fb01ab
commit
a11135152c
@ -397,30 +397,6 @@ TerrainType::TerrainType(const std::string& _name):
|
|||||||
transitionRequired(false)
|
transitionRequired(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
TerrainType& TerrainType::operator=(const TerrainType & other)
|
|
||||||
{
|
|
||||||
battleFields = other.battleFields;
|
|
||||||
prohibitTransitions = other.prohibitTransitions;
|
|
||||||
minimapBlocked = other.minimapBlocked;
|
|
||||||
minimapUnblocked = other.minimapUnblocked;
|
|
||||||
name = other.name;
|
|
||||||
musicFilename = other.musicFilename;
|
|
||||||
tilesFilename = other.tilesFilename;
|
|
||||||
terrainText = other.terrainText;
|
|
||||||
typeCode = other.typeCode;
|
|
||||||
terrainViewPatterns = other.terrainViewPatterns;
|
|
||||||
rockTerrain = other.rockTerrain;
|
|
||||||
river = other.river;
|
|
||||||
|
|
||||||
id = other.id;
|
|
||||||
moveCost = other.moveCost;
|
|
||||||
horseSoundId = other.horseSoundId;
|
|
||||||
passabilityType = other.passabilityType;
|
|
||||||
transitionRequired = other.transitionRequired;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TerrainType::operator==(const TerrainType& other)
|
bool TerrainType::operator==(const TerrainType& other)
|
||||||
{
|
{
|
||||||
@ -474,16 +450,6 @@ RiverType::RiverType(const std::string & fileName, const std::string & code, Riv
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RiverType& RiverType::operator=(const RiverType& other)
|
|
||||||
{
|
|
||||||
fileName = other.fileName;
|
|
||||||
code = other.code;
|
|
||||||
deltaName = other.deltaName;
|
|
||||||
id = other.id;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
RoadType::RoadType(const std::string& fileName, const std::string& code, RoadId id):
|
RoadType::RoadType(const std::string& fileName, const std::string& code, RoadId id):
|
||||||
fileName(fileName),
|
fileName(fileName),
|
||||||
code(code),
|
code(code),
|
||||||
@ -492,14 +458,4 @@ RoadType::RoadType(const std::string& fileName, const std::string& code, RoadId
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RoadType& RoadType::operator=(const RoadType& other)
|
VCMI_LIB_NAMESPACE_END
|
||||||
{
|
|
||||||
fileName = other.fileName;
|
|
||||||
code = other.code;
|
|
||||||
id = other.id;
|
|
||||||
movementCost = other.movementCost;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_END
|
|
||||||
|
@ -49,8 +49,6 @@ public:
|
|||||||
bool transitionRequired;
|
bool transitionRequired;
|
||||||
|
|
||||||
TerrainType(const std::string & name = "");
|
TerrainType(const std::string & name = "");
|
||||||
|
|
||||||
TerrainType& operator=(const TerrainType & other);
|
|
||||||
|
|
||||||
bool operator==(const TerrainType & other);
|
bool operator==(const TerrainType & other);
|
||||||
bool operator!=(const TerrainType & other);
|
bool operator!=(const TerrainType & other);
|
||||||
@ -99,8 +97,6 @@ public:
|
|||||||
|
|
||||||
RiverType(const std::string & fileName = "", const std::string & code = "", RiverId id = River::NO_RIVER);
|
RiverType(const std::string & fileName = "", const std::string & code = "", RiverId id = River::NO_RIVER);
|
||||||
|
|
||||||
RiverType& operator=(const RiverType & other);
|
|
||||||
|
|
||||||
template <typename Handler> void serialize(Handler& h, const int version)
|
template <typename Handler> void serialize(Handler& h, const int version)
|
||||||
{
|
{
|
||||||
h & fileName;
|
h & fileName;
|
||||||
@ -120,8 +116,6 @@ public:
|
|||||||
|
|
||||||
RoadType(const std::string & fileName = "", const std::string& code = "", RoadId id = Road::NO_ROAD);
|
RoadType(const std::string & fileName = "", const std::string& code = "", RoadId id = Road::NO_ROAD);
|
||||||
|
|
||||||
RoadType& operator=(const RoadType & other);
|
|
||||||
|
|
||||||
template <typename Handler> void serialize(Handler& h, const int version)
|
template <typename Handler> void serialize(Handler& h, const int version)
|
||||||
{
|
{
|
||||||
h & fileName;
|
h & fileName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user