PopupAttachmentInfo class: added missing initializations in constructor.

DragSelection class: added missing initialization in constructor.
MERCPROFILEGEAR class: added missing copy constructor.
WORLDITEM class: added missing copy constructor.
BuildString class: added missing assignment operator.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8906 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2020-10-21 06:28:15 +00:00
parent 2c2d8c9276
commit 0d969503c5
7 changed files with 41 additions and 2 deletions
+1 -1
View File
@@ -612,7 +612,7 @@ public:
POPUP_OPTION * o; // option that's doing the attaching
POPUP * p; // the popup that's tied to the attachment slot
PopupAttachmentInfo() {};
PopupAttachmentInfo() { usAttachment = 0; pObj = 0; subObject = 0; slotCount = 0; o = NULL; p = NULL; };
PopupAttachmentInfo(INT16 usAttachment, OBJECTTYPE * pObj, UINT8 subObject, INT16 slotCount, POPUP_OPTION * o, POPUP * p) :
usAttachment(usAttachment), pObj(pObj), subObject(subObject), slotCount(slotCount), o(o), p(p) {}
};
+1 -1
View File
@@ -158,7 +158,7 @@ private:
class DragSelection : public SkillMenuItem
{
public:
DragSelection( ) {}
DragSelection() { usSkill = 0; }
void Setup( UINT32 aVal );
void Functions( UINT32 aVal );
+18
View File
@@ -305,6 +305,24 @@ MERCPROFILEGEAR& MERCPROFILEGEAR::operator=(const MERCPROFILEGEAR& src) {
return *this;
}
// Copy constructor
MERCPROFILEGEAR::MERCPROFILEGEAR(const MERCPROFILEGEAR& src)
{
if (this != &src) {
memcpy(this, &src, SIZEOF_MERCPROFILEGEAR_POD);
inv = src.inv;
iStatus = src.iStatus;
iDrop = src.iDrop;
iNumber = src.iNumber;
lbe = src.lbe;
lStatus = src.lStatus;
invCnt = src.invCnt;
lbeCnt = src.lbeCnt;
PriceModifier = src.PriceModifier;
AbsolutePrice = src.AbsolutePrice;
}
}
// Destructor
MERCPROFILEGEAR::~MERCPROFILEGEAR( ) {
}
+12
View File
@@ -183,6 +183,18 @@ WORLDITEM& WORLDITEM::operator=(const WORLDITEM& src)
return *this;
}
WORLDITEM::WORLDITEM(const WORLDITEM& src)
{
this->fExists = src.fExists;
this->sGridNo = src.sGridNo;
this->ubLevel = src.ubLevel;
this->usFlags = src.usFlags;
this->bRenderZHeightAboveLevel = src.bRenderZHeightAboveLevel;
this->bVisible = src.bVisible;
this->ubNonExistChance = src.ubNonExistChance;
this->soldierID = src.soldierID;
this->object = src.object;
}
INT32 GetFreeWorldBombIndex( void )
{
+1
View File
@@ -52,6 +52,7 @@ public:
WORLDITEM& operator=(OLD_WORLDITEM_101& src);
WORLDITEM& operator=(_OLD_WORLDITEM& src);//dnl ch42 280909
WORLDITEM& operator=(const WORLDITEM& src);
WORLDITEM(const WORLDITEM& src);
bool operator<(WORLDITEM& compare);
BOOLEAN Save( HWFILE hFile, bool fSavingMap );
BOOLEAN Load( HWFILE hFile );
+2
View File
@@ -493,6 +493,8 @@ public:
MERCPROFILEGEAR();
// Assignment operator
MERCPROFILEGEAR& operator=(const MERCPROFILEGEAR&);
// Copy constructor
MERCPROFILEGEAR(const MERCPROFILEGEAR& src);
// Destructor
~MERCPROFILEGEAR();
+6
View File
@@ -188,6 +188,12 @@ public:
_strstr.str(bs._strstr.str());
}
BuildString& operator=(const BuildString& bs)
{
_strstr.str(bs._strstr.str());
return *this;
}
template<typename T>
BuildString(T const& t)
{