From da8afb7973871bbb53cfbcff7926659ea3e44b75 Mon Sep 17 00:00:00 2001 From: RoboticsYY Date: Sun, 17 Nov 2019 19:11:43 +0800 Subject: [PATCH] Fix warnings: friend operators not declared within a namespace --- octovis/src/extern/QGLViewer/VRender/NVector3.h | 3 +++ octovis/src/extern/QGLViewer/VRender/Primitive.h | 2 ++ octovis/src/extern/QGLViewer/VRender/Vector2.h | 2 ++ octovis/src/extern/QGLViewer/VRender/Vector3.h | 3 +++ 4 files changed, 10 insertions(+) diff --git a/octovis/src/extern/QGLViewer/VRender/NVector3.h b/octovis/src/extern/QGLViewer/VRender/NVector3.h index cac62e47..59e2da24 100644 --- a/octovis/src/extern/QGLViewer/VRender/NVector3.h +++ b/octovis/src/extern/QGLViewer/VRender/NVector3.h @@ -115,6 +115,9 @@ namespace vrender }; // interface of NVector3 + double operator*(const NVector3 &u,const Vector3 &v); + double operator*(const Vector3 &u,const NVector3 &v); + } #endif // _NVECTOR3_H diff --git a/octovis/src/extern/QGLViewer/VRender/Primitive.h b/octovis/src/extern/QGLViewer/VRender/Primitive.h index 34d1f750..35ef8e54 100644 --- a/octovis/src/extern/QGLViewer/VRender/Primitive.h +++ b/octovis/src/extern/QGLViewer/VRender/Primitive.h @@ -66,6 +66,8 @@ namespace vrender class Feedback3DColor ; class Primitive ; + std::ostream& operator<<(std::ostream&,const Feedback3DColor&); + #define EPS_SMOOTH_LINE_FACTOR 0.06 /* Lower for better smooth lines. */ // A Feedback3DColor is a structure containing informations about a vertex projected into diff --git a/octovis/src/extern/QGLViewer/VRender/Vector2.h b/octovis/src/extern/QGLViewer/VRender/Vector2.h index 9414768e..33e26269 100644 --- a/octovis/src/extern/QGLViewer/VRender/Vector2.h +++ b/octovis/src/extern/QGLViewer/VRender/Vector2.h @@ -176,6 +176,8 @@ namespace vrender double _xyz[2]; //!< The 3 vector components }; // interface of Vector2 + + Vector2 operator- (const Vector2&); } #endif // _VECTOR2_H diff --git a/octovis/src/extern/QGLViewer/VRender/Vector3.h b/octovis/src/extern/QGLViewer/VRender/Vector3.h index f6a58535..ddb14581 100644 --- a/octovis/src/extern/QGLViewer/VRender/Vector3.h +++ b/octovis/src/extern/QGLViewer/VRender/Vector3.h @@ -191,5 +191,8 @@ namespace vrender double _xyz[3]; //!< The 3 vector components }; // interface of Vector3 + + Vector3 operator* (double,const Vector3&); + std::ostream& operator<< (std::ostream&,const Vector3&); } #endif // _VECTOR3_H