mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
Nullkiller: fix build and warnings
This commit is contained in:
committed by
Andrii Danylchenko
parent
fdd5be1e40
commit
682707e4f1
@ -131,12 +131,15 @@ bool CaptureObjectsBehavior::shouldVisitObject(ObjectIdRef obj) const
|
|||||||
{
|
{
|
||||||
const CGObjectInstance* objInstance = obj;
|
const CGObjectInstance* objInstance = obj;
|
||||||
|
|
||||||
if(!objInstance || objectTypes.size() && !vstd::contains(objectTypes, objInstance->ID.num))
|
if(!objInstance)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(objectTypes.size() && !vstd::contains(objectTypes, objInstance->ID.num))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!objInstance || objectSubTypes.size() && !vstd::contains(objectSubTypes, objInstance->subID))
|
if(objectSubTypes.size() && !vstd::contains(objectSubTypes, objInstance->subID))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "Nullkiller.h"
|
#include "Nullkiller.h"
|
||||||
#include "../VCAI.h"
|
#include "../VCAI.h"
|
||||||
#include "../AIHelper.h"
|
#include "../AIhelper.h"
|
||||||
#include "../Behaviors/CaptureObjectsBehavior.h"
|
#include "../Behaviors/CaptureObjectsBehavior.h"
|
||||||
#include "../Behaviors/RecruitHeroBehavior.h"
|
#include "../Behaviors/RecruitHeroBehavior.h"
|
||||||
#include "../Behaviors/BuyArmyBehavior.h"
|
#include "../Behaviors/BuyArmyBehavior.h"
|
||||||
|
Reference in New Issue
Block a user