mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
@@ -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) {}
|
||||
};
|
||||
|
||||
@@ -158,7 +158,7 @@ private:
|
||||
class DragSelection : public SkillMenuItem
|
||||
{
|
||||
public:
|
||||
DragSelection( ) {}
|
||||
DragSelection() { usSkill = 0; }
|
||||
|
||||
void Setup( UINT32 aVal );
|
||||
void Functions( UINT32 aVal );
|
||||
|
||||
@@ -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( ) {
|
||||
}
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -493,6 +493,8 @@ public:
|
||||
MERCPROFILEGEAR();
|
||||
// Assignment operator
|
||||
MERCPROFILEGEAR& operator=(const MERCPROFILEGEAR&);
|
||||
// Copy constructor
|
||||
MERCPROFILEGEAR(const MERCPROFILEGEAR& src);
|
||||
// Destructor
|
||||
~MERCPROFILEGEAR();
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user