d04 check leaks and error ok
This commit is contained in:
@@ -12,7 +12,7 @@ Cat::Cat() {
|
||||
return;
|
||||
}
|
||||
|
||||
Cat::Cat( Cat const & src ) {
|
||||
Cat::Cat( Cat const & src ) : Animal(src) {
|
||||
std::cout << COPLIEN_COLOR "Cat copy constructor" RESET "\n";
|
||||
*this = src;
|
||||
return;
|
||||
|
||||
@@ -12,7 +12,7 @@ Dog::Dog() {
|
||||
return;
|
||||
}
|
||||
|
||||
Dog::Dog( Dog const & src ) {
|
||||
Dog::Dog( Dog const & src ) : Animal(src) {
|
||||
std::cout << COPLIEN_COLOR "Dog copy constructor" RESET "\n";
|
||||
*this = src;
|
||||
return;
|
||||
|
||||
@@ -72,6 +72,9 @@ $(OBJS): $(HEADERS:%=$(D_HEADERS)/%)
|
||||
$(NAME): $(OBJS)
|
||||
$(CC) $(OBJS) -o $@ $(LIBS)
|
||||
|
||||
leaks: $(NAME)
|
||||
valgrind --leak-check=full --show-leak-kinds=all ./$(NAME)
|
||||
|
||||
clean:
|
||||
$(RM_OBJS)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ WrongCat::WrongCat() {
|
||||
return;
|
||||
}
|
||||
|
||||
WrongCat::WrongCat( WrongCat const & src ) {
|
||||
WrongCat::WrongCat( WrongCat const & src ) : WrongAnimal(src) {
|
||||
std::cout << COPLIEN_COLOR "WrongCat copy constructor" RESET "\n";
|
||||
*this = src;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user