[brlcad-commits] CVS: brlcad/include vector.h, 1.11, 1.12 vector_fpu.h, 1.9, 1.10 vector_x86.h, 1.1
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <d_r...@us...> - 2007-03-28 13:21:07
|
Update of /cvsroot/brlcad/brlcad/include In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23544/brlcad/include Modified Files: vector.h vector_fpu.h vector_x86.h Log Message: VC++ 6.0 adaptions: removed (redundant) struct keywords removed the unnecessary friend statements (operator<< does not access private class members), they cause trouble only Index: vector.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/vector.h,v retrieving revision 1.11 retrieving revision 1.12 diff -w -u -r1.11 -r1.12 --- vector.h 27 Mar 2007 21:56:47 -0000 1.11 +++ vector.h 28 Mar 2007 13:21:03 -0000 1.12 @@ -54,8 +54,6 @@ double foldr(double proto, const dvec_op& operation, int limit = LEN); double foldl(double proto, const dvec_op& operation, int limit = LEN); - friend std::ostream& operator<< <LEN>(std::ostream& out, const dvec<LEN>& v); - class mul : public dvec_op { public: double operator()(double a, double b) const { return a * b; } @@ -73,10 +71,10 @@ class sqrt : public dvec_unop { public: - double operator()(double a) const { return sqrt(a); } + double operator()(double a) const { return ::sqrt(a); } }; private: - struct vec_internal<LEN> data; + vec_internal<LEN> data; dvec(const vec_internal<LEN>& d); }; Index: vector_fpu.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/vector_fpu.h,v retrieving revision 1.9 retrieving revision 1.10 diff -w -u -r1.9 -r1.10 --- vector_fpu.h 27 Mar 2007 21:56:47 -0000 1.9 +++ vector_fpu.h 28 Mar 2007 13:21:03 -0000 1.10 @@ -83,7 +83,7 @@ inline dvec<LEN> dvec<LEN>::operator+(const dvec<LEN>& b) { - struct vec_internal<LEN> r; + vec_internal<LEN> r; for (int i = 0; i < LEN; i++) r.v[i] = data.v[i] + b.data.v[i]; return dvec<LEN>(r); @@ -93,7 +93,7 @@ inline dvec<LEN> dvec<LEN>::operator-(const dvec<LEN>& b) { - struct vec_internal<LEN> r; + vec_internal<LEN> r; for (int i = 0; i < LEN; i++) r.v[i] = data.v[i] - b.data.v[i]; return dvec<LEN>(r); @@ -103,7 +103,7 @@ inline dvec<LEN> dvec<LEN>::operator*(const dvec<LEN>& b) { - struct vec_internal<LEN> r; + vec_internal<LEN> r; for (int i = 0; i < LEN; i++) r.v[i] = data.v[i] * b.data.v[i]; return dvec<LEN>(r); @@ -113,7 +113,7 @@ inline dvec<LEN> dvec<LEN>::operator/(const dvec<LEN>& b) { - struct vec_internal<LEN> r; + vec_internal<LEN> r; for (int i = 0; i < LEN; i++) r.v[i] = data.v[i] / b.data.v[i]; return dvec<LEN>(r); @@ -123,7 +123,7 @@ inline dvec<LEN> dvec<LEN>::madd(const dvec<LEN>& s, const dvec<LEN>& b) { - struct vec_internal<LEN> r; + vec_internal<LEN> r; for (int i = 0; i < LEN; i++) r.v[i] = data.v[i] * s.data.v[i] + b.data.v[i]; return dvec<LEN>(r); @@ -133,7 +133,7 @@ inline dvec<LEN> dvec<LEN>::madd(const double s, const dvec<LEN>& b) { - struct vec_internal<LEN> r; + vec_internal<LEN> r; for (int i = 0; i < LEN; i++) r.v[i] = data.v[i] * s + b.data.v[i]; return dvec<LEN>(r); @@ -164,7 +164,7 @@ inline dvec<LEN> dvec<LEN>::map(const dvec_unop& op, int limit) { - struct vec_internal<LEN> r; + vec_internal<LEN> r; for (int i = 0; i < limit; i++) { r.v[i] = op(data.v[i]); } @@ -254,7 +254,6 @@ v[0] = x; v[1] = y; } - friend std::ostream& operator<<(std::ostream& out, const vec2d& v); }; inline std::ostream& Index: vector_x86.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/vector_x86.h,v retrieving revision 1.13 retrieving revision 1.14 diff -w -u -r1.13 -r1.14 --- vector_x86.h 27 Mar 2007 21:56:47 -0000 1.13 +++ vector_x86.h 28 Mar 2007 13:21:03 -0000 1.14 @@ -115,7 +115,7 @@ } #define OP_IMPL(__op__) { \ - struct vec_internal<LEN> result; \ + vec_internal<LEN> result; \ for (int i = 0; i < LEN/2; i++) { \ result.v[i] = __op__(data.v[i], b.data.v[i]); \ } \ @@ -154,7 +154,7 @@ inline dvec<LEN> dvec<LEN>::madd(const dvec<LEN>& s, const dvec<LEN>& b) { - struct vec_internal<LEN> r; + vec_internal<LEN> r; for (int i = 0; i < LEN/2; i++) { r.v[i] = _mm_mul_pd(data.v[i], s.data.v[i]); } @@ -318,7 +318,6 @@ _vec = _mm_load_pd(v); } - friend std::ostream& operator<<(std::ostream& out, const vec2d& v); }; inline std::ostream& |