resolved one error and one segfault in xpp02
This commit is contained in:
@@ -1,55 +1,54 @@
|
||||
#ifndef ASPELL_HPP
|
||||
# define ASPELL_HPP
|
||||
#define ASPELL_HPP
|
||||
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
class ATarget;
|
||||
|
||||
class ASpell {
|
||||
|
||||
private:
|
||||
class ASpell
|
||||
{
|
||||
protected:
|
||||
std::string name;
|
||||
std::string effects;
|
||||
|
||||
public:
|
||||
ASpell()
|
||||
{};
|
||||
{}
|
||||
ASpell(ASpell const & other)
|
||||
{
|
||||
*this = other;
|
||||
};
|
||||
}
|
||||
ASpell & operator=(ASpell const & other)
|
||||
{
|
||||
this->name = other.name;
|
||||
this->effects = other.effects;
|
||||
return (*this);
|
||||
};
|
||||
return *this;
|
||||
}
|
||||
ASpell(std::string const & name, std::string const & effects)
|
||||
{
|
||||
this->name = name;
|
||||
this->effects = effects;
|
||||
};
|
||||
}
|
||||
virtual ~ASpell()
|
||||
{};
|
||||
{}
|
||||
|
||||
std::string const & getName() const
|
||||
{
|
||||
return (this->name);
|
||||
};
|
||||
return this->name;
|
||||
}
|
||||
std::string const & getEffects() const
|
||||
{
|
||||
return (this->effects);
|
||||
};
|
||||
return this->effects;
|
||||
}
|
||||
|
||||
void launch(ATarget const & atarget) const;
|
||||
void launch(ATarget const &) const;
|
||||
|
||||
virtual ASpell * clone() const = 0;
|
||||
|
||||
};
|
||||
|
||||
#include "ATarget.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user