modif d01 ex03 weapon gettype return ref sur const string, d02 ex02 fini

This commit is contained in:
Hugo LAMY
2022-02-16 18:06:24 +01:00
parent d45a096244
commit ae62a6d0d7
7 changed files with 149 additions and 88 deletions

View File

@@ -8,7 +8,7 @@ Weapon::Weapon( std::string type ) {
}
Weapon::~Weapon() {}
std::string Weapon::getType( void ) const {
std::string const & Weapon::getType( void ) const {
return this->_type;

View File

@@ -11,8 +11,8 @@ public:
Weapon( std::string type );
~Weapon();
std::string getType() const;
void setType( std::string type );
std::string const & getType() const;
void setType( std::string type );
private:

Binary file not shown.