From: Igor Wodiany Date: Thu, 19 Oct 2017 21:05:49 +0000 (+0100) Subject: Add const to getViewerPose() X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~472^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7cbe6e947ed894ed61dddcc3cf0804982b4e3b8;p=platform%2Fupstream%2Fopencv.git Add const to getViewerPose() getViewerPose() doesn't modify an object of the class so it can be made const. It also makes this method consistent with other getters in the class as they are defined as const. --- diff --git a/modules/viz/src/vizimpl.cpp b/modules/viz/src/vizimpl.cpp index a927ca6..b9cdc91 100644 --- a/modules/viz/src/vizimpl.cpp +++ b/modules/viz/src/vizimpl.cpp @@ -509,7 +509,7 @@ void cv::viz::Viz3d::VizImpl::setViewerPose(const Affine3d &pose) } ///////////////////////////////////////////////////////////////////////////////////////////// -cv::Affine3d cv::viz::Viz3d::VizImpl::getViewerPose() +cv::Affine3d cv::viz::Viz3d::VizImpl::getViewerPose() const { vtkCamera& camera = *renderer_->GetActiveCamera(); diff --git a/modules/viz/src/vizimpl.hpp b/modules/viz/src/vizimpl.hpp index 65edffb..d3e7f17 100644 --- a/modules/viz/src/vizimpl.hpp +++ b/modules/viz/src/vizimpl.hpp @@ -88,7 +88,7 @@ public: void resetCamera(); void setViewerPose(const Affine3d &pose); - Affine3d getViewerPose(); + Affine3d getViewerPose() const; void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord); void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction);