resolved one error and one segfault in xpp02
This commit is contained in:
@@ -1,40 +1,47 @@
|
||||
#ifndef ATARGET_HPP
|
||||
# define ATARGET_HPP
|
||||
#define ATARGET_HPP
|
||||
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
class ASpell;
|
||||
|
||||
class ATarget {
|
||||
private:
|
||||
|
||||
class ATarget
|
||||
{
|
||||
protected:
|
||||
std::string type;
|
||||
|
||||
public:
|
||||
ATarget() {
|
||||
};
|
||||
ATarget(std::string const & type) {
|
||||
this->type = type;
|
||||
};
|
||||
ATarget(ATarget const & other) {
|
||||
*this = other;
|
||||
};
|
||||
ATarget & operator=(ATarget const & other) {
|
||||
ATarget()
|
||||
{}
|
||||
ATarget(ATarget const & other)
|
||||
{
|
||||
* this = other;
|
||||
}
|
||||
ATarget & operator=(ATarget const & other)
|
||||
{
|
||||
this->type = other.type;
|
||||
return (*this);
|
||||
};
|
||||
virtual ~ATarget() {};
|
||||
return *this;
|
||||
}
|
||||
ATarget(std::string const & type)
|
||||
{
|
||||
this->type = type;
|
||||
}
|
||||
virtual ~ATarget()
|
||||
{}
|
||||
|
||||
std::string const & getType() const {
|
||||
return (this->type);
|
||||
};
|
||||
std::string const & getType() const
|
||||
{
|
||||
return this->type;
|
||||
}
|
||||
|
||||
void getHitBySpell(ASpell const & aspell) const;
|
||||
void getHitBySpell(ASpell const &) const;
|
||||
|
||||
virtual ATarget * clone() const = 0;
|
||||
|
||||
};
|
||||
|
||||
#include "ASpell.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user