From 4157874768594164e1d5b366e5a9cb9bc931e761 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 16 Oct 2013 23:29:16 +0200 Subject: pass -Wall -Wextra -pedantic --- ftnoir_tracker_aruco/include/markerdetector.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ftnoir_tracker_aruco/include/markerdetector.h') diff --git a/ftnoir_tracker_aruco/include/markerdetector.h b/ftnoir_tracker_aruco/include/markerdetector.h index 35369cea..68aa7f8a 100644 --- a/ftnoir_tracker_aruco/include/markerdetector.h +++ b/ftnoir_tracker_aruco/include/markerdetector.h @@ -52,10 +52,13 @@ class ARUCO_EXPORTS MarkerDetector contour=M.contour; idx=M.idx; } - MarkerCandidate & operator=(const MarkerCandidate &M){ + MarkerCandidate operator=(const MarkerCandidate &M){ + if (this == &M) + return *this; (*(Marker*)this)=(*(Marker*)&M); contour=M.contour; idx=M.idx; + return M; } vector contour;//all the points of its contour -- cgit v1.2.3