mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Add more "const"
This commit is contained in:
		| @@ -87,18 +87,18 @@ public: | ||||
| struct DLL_LINKAGE SpellCastContext | ||||
| { | ||||
| public: | ||||
| 	SpellCastEnvironment * env; | ||||
| 	const SpellCastEnvironment * env; | ||||
| 	 | ||||
| 	int spellLvl; | ||||
| //	BattleHex destination; | ||||
| 	ui8 casterSide; | ||||
| 	PlayerColor casterColor; | ||||
| 	CGHeroInstance * caster; | ||||
| 	CGHeroInstance * secHero; | ||||
| 	const CGHeroInstance * caster; | ||||
| 	const CGHeroInstance * secHero; | ||||
| 	int usedSpellPower; | ||||
| 	ECastingMode::ECastingMode mode; | ||||
| 	CStack * targetStack; | ||||
| 	CStack * selectedStack;	 | ||||
| 	const CStack * targetStack; | ||||
| 	const CStack * selectedStack;	 | ||||
| }; | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -129,12 +129,12 @@ ISpellMechanics::ISpellMechanics(CSpell * s): | ||||
|  | ||||
| ///DefaultSpellMechanics | ||||
|  | ||||
| bool DefaultSpellMechanics::adventureCast(SpellCastContext& context) const | ||||
| bool DefaultSpellMechanics::adventureCast(const SpellCastContext& context) const | ||||
| { | ||||
| 	return false; //there is no general algorithm for castind adventure spells | ||||
| 	return false; //there is no general algorithm for casting adventure spells | ||||
| } | ||||
|  | ||||
| bool DefaultSpellMechanics::battleCast(SpellCastContext& context) const | ||||
| bool DefaultSpellMechanics::battleCast(const SpellCastContext& context) const | ||||
| { | ||||
| 	return false; //todo; DefaultSpellMechanics::battleCast | ||||
| } | ||||
|   | ||||
| @@ -48,8 +48,8 @@ public: | ||||
|      * \return true if no error | ||||
|      * | ||||
|      */                            | ||||
| 	virtual bool adventureCast(SpellCastContext & context) const = 0;  | ||||
| 	virtual bool battleCast(SpellCastContext & context) const = 0; 	 | ||||
| 	virtual bool adventureCast(const SpellCastContext & context) const = 0;  | ||||
| 	virtual bool battleCast(const SpellCastContext & context) const = 0; 	 | ||||
| 	 | ||||
| protected: | ||||
| 	CSpell * owner;	 | ||||
| @@ -65,8 +65,8 @@ public: | ||||
| 	 | ||||
| 	ESpellCastProblem::ESpellCastProblem isImmuneByStack(const CGHeroInstance * caster, const CStack * obj) const override; | ||||
| 	 | ||||
| 	bool adventureCast(SpellCastContext & context) const override;  | ||||
| 	bool battleCast(SpellCastContext & context) const override;  | ||||
| 	bool adventureCast(const SpellCastContext & context) const override;  | ||||
| 	bool battleCast(const SpellCastContext & context) const override;  | ||||
| }; | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user