From af2dcca279e6fc23c9b1694170cbdfe36b32eb79 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 9 Jan 2018 15:05:35 +0100 Subject: logic, cv: fix header namespace pollution We've had "using namespace options;" in headers for a while now. --- cv/affine.cpp | 4 ++++ cv/affine.hpp | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'cv') diff --git a/cv/affine.cpp b/cv/affine.cpp index 9018e107..1b37305c 100644 --- a/cv/affine.cpp +++ b/cv/affine.cpp @@ -7,6 +7,8 @@ #include "affine.hpp" +namespace affine_impl { + Affine::Affine() : R(mat33::eye()), t(0,0,0) {} Affine::Affine(const mat33& R, const vec3& t) : R(R),t(t) {} @@ -30,3 +32,5 @@ vec3 operator*(const Affine& X, const vec3& v) { return X.R*v + X.t; } + +} // ns affine_impl diff --git a/cv/affine.hpp b/cv/affine.hpp index aedb0bc8..3bc85c95 100644 --- a/cv/affine.hpp +++ b/cv/affine.hpp @@ -9,9 +9,10 @@ #include #include "numeric.hpp" -using namespace types; +namespace affine_impl { +using namespace types; class Affine final { @@ -27,3 +28,8 @@ Affine operator*(const Affine& X, const Affine& Y); Affine operator*(const mat33& X, const Affine& Y); Affine operator*(const Affine& X, const mat33& Y); vec3 operator*(const Affine& X, const vec3& v); + +} // ns affine_impl + +using affine_impl::Affine; +using affine_impl::operator *; -- cgit v1.2.3