From 45d3b405eb1bd3f3f7f4f2043621a57e6bee1365 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Wed, 9 Jun 2010 09:30:22 +0200 Subject: [PATCH] Fixed many MSVC warnings. --- test/selfadjoint.cpp | 2 +- unsupported/Eigen/FFT | 20 +++++++++++-------- unsupported/Eigen/src/BVH/BVAlgorithms.h | 6 +++++- .../HybridNonLinearSolver.h | 2 ++ .../LevenbergMarquardt.h | 2 ++ .../Eigen/src/NumericalDiff/NumericalDiff.h | 2 ++ unsupported/test/NonLinearOptimization.cpp | 4 ++++ 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/test/selfadjoint.cpp b/test/selfadjoint.cpp index 2eaf6d459..1ea5a3a3c 100644 --- a/test/selfadjoint.cpp +++ b/test/selfadjoint.cpp @@ -55,7 +55,7 @@ void test_selfadjoint() { for(int i = 0; i < g_repeat ; i++) { - EIGEN_UNUSED int s = ei_random(1,20); + int s = ei_random(1,20); EIGEN_UNUSED_VARIABLE(s); CALL_SUBTEST_1( selfadjoint(Matrix()) ); CALL_SUBTEST_2( selfadjoint(Matrix()) ); diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index a41a89a8a..0e8e57e50 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -136,10 +136,12 @@ struct fft_fwd_proxy int rows() const { return m_src.rows(); } int cols() const { return m_src.cols(); } - protected: - const T_SrcMat & m_src; - T_FftIfc & m_ifc; - int m_nfft; +protected: + const T_SrcMat & m_src; + T_FftIfc & m_ifc; + int m_nfft; +private: + fft_fwd_proxy& operator=(const fft_fwd_proxy&); }; template @@ -152,10 +154,12 @@ struct fft_inv_proxy int rows() const { return m_src.rows(); } int cols() const { return m_src.cols(); } - protected: - const T_SrcMat & m_src; - T_FftIfc & m_ifc; - int m_nfft; +protected: + const T_SrcMat & m_src; + T_FftIfc & m_ifc; + int m_nfft; +private: + fft_inv_proxy& operator=(const fft_inv_proxy&); }; diff --git a/unsupported/Eigen/src/BVH/BVAlgorithms.h b/unsupported/Eigen/src/BVH/BVAlgorithms.h index 63725763a..40320291d 100644 --- a/unsupported/Eigen/src/BVH/BVAlgorithms.h +++ b/unsupported/Eigen/src/BVH/BVAlgorithms.h @@ -86,9 +86,11 @@ struct ei_intersector_helper2 bool intersectObject(const Object2 &obj) { return intersector.intersectObjectObject(stored, obj); } Object1 stored; Intersector &intersector; +private: + ei_intersector_helper2& operator=(const ei_intersector_helper2&); }; -/** Given two BVH's, runs the query on their cartesian product encapsulated by \a intersector. +/** Given two BVH's, runs the query on their Cartesian product encapsulated by \a intersector. * The Intersector type must provide the following members: \code bool intersectVolumeVolume(const BVH1::Volume &v1, const BVH2::Volume &v2) //returns true if product of volumes intersects the query bool intersectVolumeObject(const BVH1::Volume &v1, const BVH2::Object &o2) //returns true if the volume-object product intersects the query @@ -207,6 +209,8 @@ struct ei_minimizer_helper1 Scalar minimumOnObject(const Object1 &obj) { return minimizer.minimumOnObjectObject(obj, stored); } Object2 stored; Minimizer &minimizer; +private: + ei_minimizer_helper1& operator=(const ei_minimizer_helper1&) {} }; template diff --git a/unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h b/unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h index aba31b238..0ef3ecafa 100644 --- a/unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h +++ b/unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h @@ -124,6 +124,8 @@ private: Index ncfail; Scalar actred, prered; FVectorType wa1, wa2, wa3, wa4; + + HybridNonLinearSolver& operator=(const HybridNonLinearSolver&); }; diff --git a/unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h b/unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h index 63eb66738..a8f3f3e64 100644 --- a/unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h +++ b/unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h @@ -133,6 +133,8 @@ private: Scalar delta; Scalar ratio; Scalar pnorm, xnorm, fnorm1, actred, dirder, prered; + + LevenbergMarquardt& operator=(const LevenbergMarquardt&); }; template diff --git a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h index 8d23cb4ae..a25c9cd6d 100644 --- a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h +++ b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h @@ -130,6 +130,8 @@ public: } private: Scalar epsfcn; + + NumericalDiff& operator=(const NumericalDiff&); }; //vim: ai ts=4 sts=4 et sw=4 diff --git a/unsupported/test/NonLinearOptimization.cpp b/unsupported/test/NonLinearOptimization.cpp index 0a609f750..c5dd08417 100644 --- a/unsupported/test/NonLinearOptimization.cpp +++ b/unsupported/test/NonLinearOptimization.cpp @@ -8,6 +8,10 @@ #include "main.h" #include +// This disables some useless Warnings on MSVC. +// It is intended to be done for this test only. +#include + int fcn_chkder(const VectorXd &x, VectorXd &fvec, MatrixXd &fjac, int iflag) { /* subroutine fcn for chkder example. */