mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Code formatting and cleanup
This commit is contained in:
@@ -59,54 +59,6 @@ ObjectTemplate::ObjectTemplate():
|
||||
{
|
||||
}
|
||||
|
||||
ObjectTemplate::ObjectTemplate(const ObjectTemplate& other):
|
||||
visitDir(other.visitDir),
|
||||
allowedTerrains(other.allowedTerrains),
|
||||
id(other.id),
|
||||
subid(other.subid),
|
||||
printPriority(other.printPriority),
|
||||
animationFile(other.animationFile),
|
||||
editorAnimationFile(other.editorAnimationFile),
|
||||
stringID(other.stringID),
|
||||
width(other.width),
|
||||
height(other.height),
|
||||
visitable(other.visitable),
|
||||
blockedOffsets(other.blockedOffsets),
|
||||
blockMapOffset(other.blockMapOffset),
|
||||
visitableOffset(other.visitableOffset)
|
||||
{
|
||||
//default copy constructor is failing with usedTiles this for unknown reason
|
||||
|
||||
usedTiles.resize(other.usedTiles.size());
|
||||
for(size_t i = 0; i < usedTiles.size(); i++)
|
||||
std::copy(other.usedTiles[i].begin(), other.usedTiles[i].end(), std::back_inserter(usedTiles[i]));
|
||||
}
|
||||
|
||||
ObjectTemplate & ObjectTemplate::operator=(const ObjectTemplate & rhs)
|
||||
{
|
||||
visitDir = rhs.visitDir;
|
||||
allowedTerrains = rhs.allowedTerrains;
|
||||
id = rhs.id;
|
||||
subid = rhs.subid;
|
||||
printPriority = rhs.printPriority;
|
||||
animationFile = rhs.animationFile;
|
||||
editorAnimationFile = rhs.editorAnimationFile;
|
||||
stringID = rhs.stringID;
|
||||
width = rhs.width;
|
||||
height = rhs.height;
|
||||
visitable = rhs.visitable;
|
||||
blockedOffsets = rhs.blockedOffsets;
|
||||
blockMapOffset = rhs.blockMapOffset;
|
||||
visitableOffset = rhs.visitableOffset;
|
||||
|
||||
usedTiles.clear();
|
||||
usedTiles.resize(rhs.usedTiles.size());
|
||||
for(size_t i = 0; i < usedTiles.size(); i++)
|
||||
std::copy(rhs.usedTiles[i].begin(), rhs.usedTiles[i].end(), std::back_inserter(usedTiles[i]));
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void ObjectTemplate::afterLoadFixup()
|
||||
{
|
||||
if(id == Obj::EVENT)
|
||||
|
||||
Reference in New Issue
Block a user