From af032db052faaa99fc0894ba3128c540a46012e5 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 9 Oct 2018 11:38:29 +0800 Subject: src/projector: Fix warning on uninitialized base class Credit: https://stackoverflow.com/a/43613363 --- src/projector.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/projector.hpp b/src/projector.hpp index 4ef4b32..ae7526b 100644 --- a/src/projector.hpp +++ b/src/projector.hpp @@ -36,8 +36,9 @@ namespace opt_utilities {} //copy cstr projector(const projector& rhs) - :cm_per_pixel(rhs.cm_per_pixel) + :model,std::vector,std::vector >(rhs) { + cm_per_pixel=rhs.cm_per_pixel; attach_model(*(rhs.pmodel)); if(rhs.pcfunc) { @@ -51,7 +52,6 @@ namespace opt_utilities //assign operator projector& operator=(const projector& rhs) { - cm_per_pixel=rhs.cm_per_pixel; if(pmodel) { pmodel->destroy(); -- cgit v1.2.2