d03 check ok pour leaks et correction warning copy contructor avec g++
This commit is contained in:
@@ -52,6 +52,9 @@ $(OBJS): $(HEADERS:%=$(D_HEADERS)/%)
|
||||
$(NAME): $(OBJS)
|
||||
$(CC) $(OBJS) -o $@ $(LIBS)
|
||||
|
||||
leaks: $(NAME)
|
||||
valgrind --leak-check=full --show-leak-kinds=all ./$(NAME)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@ ScavTrap::ScavTrap( std::string name ) : ClapTrap(name) {
|
||||
return;
|
||||
}
|
||||
|
||||
ScavTrap::ScavTrap( ScavTrap const & src ) {
|
||||
// base class better be explicitly called (g++ warning)
|
||||
// https://stackoverflow.com/questions/43612772/base-class-class-a-should-be-explicitly-initialized-in-the-copy-constructor
|
||||
ScavTrap::ScavTrap( ScavTrap const & src ) : ClapTrap(src) {
|
||||
_class = _dClass;
|
||||
*this = src;
|
||||
_number = getTotalNumber();
|
||||
|
||||
BIN
d03/ex01/robots
BIN
d03/ex01/robots
Binary file not shown.
Reference in New Issue
Block a user