From 9dd7a48967f99793b818f7362ac8e95717186774 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 10 Nov 2020 09:26:04 +0100 Subject: Added more tests for cpp01/07 --- cpp02/ex00/Fixed.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpp02/ex00/Fixed.cpp') diff --git a/cpp02/ex00/Fixed.cpp b/cpp02/ex00/Fixed.cpp index eb0501b..fc50102 100644 --- a/cpp02/ex00/Fixed.cpp +++ b/cpp02/ex00/Fixed.cpp @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/13 11:45:18 by charles #+# #+# */ -/* Updated: 2020/04/13 11:58:37 by charles ### ########.fr */ +/* Updated: 2020/11/09 13:07:28 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,10 +29,11 @@ Fixed::~Fixed() std::cout << "Destructor called" << std::endl; } -void Fixed::operator=(Fixed const& other) +Fixed& Fixed::operator=(Fixed const& other) { std::cout << "Assignation operator called" << std::endl; m_value = other.getRawBits(); + return *this; } int Fixed::getRawBits() const -- cgit