From 17f51995e3b63ce240e22873c5317ec24ac4e070 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 20 Dec 2011 15:05:37 +0000 Subject: [PATCH] a few more win32 build issues reported by forum users --- panda/src/ode/odeBody.I | 4 ++-- panda/src/ode/odeBody.h | 4 ++-- panda/src/physics/baseIntegrator.I | 4 ++-- pandatool/src/daeegg/daeMaterials.cxx | 2 +- pandatool/src/daeegg/daeMaterials.h | 2 +- pandatool/src/flt/fltHeader.cxx | 6 ++++-- pandatool/src/flt/fltHeader.h | 4 ++-- pandatool/src/maxegg/maxEggLoader.cxx | 8 ++++---- pandatool/src/vrmlegg/indexedFaceSet.h | 2 +- 9 files changed, 19 insertions(+), 17 deletions(-) diff --git a/panda/src/ode/odeBody.I b/panda/src/ode/odeBody.I index 0193da05d0..7d4d784532 100755 --- a/panda/src/ode/odeBody.I +++ b/panda/src/ode/odeBody.I @@ -128,7 +128,7 @@ set_position(const LVecBase3f &pos) { } INLINE void OdeBody:: -set_rotation(const LMatrix3f r) { +set_rotation(const LMatrix3f &r) { dMatrix3 mat3 = { r(0, 0), r(0, 1), r(0, 2), 0, r(1, 0), r(1, 1), r(1, 2), 0, r(2, 0), r(2, 1), r(2, 2), 0 }; @@ -137,7 +137,7 @@ set_rotation(const LMatrix3f r) { } INLINE void OdeBody:: -set_quaternion(const LQuaternionf q) { +set_quaternion(const LQuaternionf &q) { dQuaternion quat = { q[0], q[1], q[2], q[3] }; dBodySetQuaternion(_id, quat); } diff --git a/panda/src/ode/odeBody.h b/panda/src/ode/odeBody.h index 1f6e1df5b5..51c5394d35 100755 --- a/panda/src/ode/odeBody.h +++ b/panda/src/ode/odeBody.h @@ -62,8 +62,8 @@ PUBLISHED: INLINE void set_position(dReal x, dReal y, dReal z); INLINE void set_position(const LVecBase3f &pos); - INLINE void set_rotation(const LMatrix3f r); - INLINE void set_quaternion(const LQuaternionf q); + INLINE void set_rotation(const LMatrix3f &r); + INLINE void set_quaternion(const LQuaternionf &q); INLINE void set_linear_vel(dReal x, dReal y, dReal z); INLINE void set_linear_vel(const LVecBase3f &vel); INLINE void set_angular_vel(dReal x, dReal y, dReal z); diff --git a/panda/src/physics/baseIntegrator.I b/panda/src/physics/baseIntegrator.I index 62a42969bb..286e0519ec 100644 --- a/panda/src/physics/baseIntegrator.I +++ b/panda/src/physics/baseIntegrator.I @@ -16,7 +16,7 @@ // Function : get_precomputed_linear_matrices // Access : protected //////////////////////////////////////////////////////////////////// -INLINE const pvector< LMatrix4 > &BaseIntegrator:: +INLINE const BaseIntegrator::MatrixVector &BaseIntegrator:: get_precomputed_linear_matrices() const { return _precomputed_linear_matrices; } @@ -25,7 +25,7 @@ get_precomputed_linear_matrices() const { // Function : get_precomputed_angular_matrices // Access : protected //////////////////////////////////////////////////////////////////// -INLINE const pvector< LMatrix4 > &BaseIntegrator:: +INLINE const BaseIntegrator::MatrixVector &BaseIntegrator:: get_precomputed_angular_matrices() const { return _precomputed_angular_matrices; } diff --git a/pandatool/src/daeegg/daeMaterials.cxx b/pandatool/src/daeegg/daeMaterials.cxx index fcd10e602f..cdb52d0c8f 100755 --- a/pandatool/src/daeegg/daeMaterials.cxx +++ b/pandatool/src/daeegg/daeMaterials.cxx @@ -374,7 +374,7 @@ convert_filter_type(const FUDaeTextureFilterFunction::FilterFunction orig_type) // Description: Converts collada blend attribs to Panda's equivalents. //////////////////////////////////////////////////////////////////// PT(DaeMaterials::DaeBlendSettings) DaeMaterials:: -convert_blend(FCDEffectStandard::TransparencyMode mode, LColor transparent, double transparency) { +convert_blend(FCDEffectStandard::TransparencyMode mode, const LColor &transparent, double transparency) { // Create the DaeBlendSettings and fill it with some defaults. PT(DaeBlendSettings) blend = new DaeBlendSettings(); blend->_enabled = true; diff --git a/pandatool/src/daeegg/daeMaterials.h b/pandatool/src/daeegg/daeMaterials.h index 4b1950889a..33416566e5 100755 --- a/pandatool/src/daeegg/daeMaterials.h +++ b/pandatool/src/daeegg/daeMaterials.h @@ -79,7 +79,7 @@ private: void process_texture_bucket(const string semantic, const FCDEffectStandard* effect_common, FUDaeTextureChannel::Channel bucket, EggTexture::EnvType envtype = EggTexture::ET_unspecified, EggTexture::Format format = EggTexture::F_unspecified); void process_extra(const string semantic, const FCDExtra* extra); - static PT(DaeBlendSettings) convert_blend(FCDEffectStandard::TransparencyMode mode, LColor transparent, double transparency); + static PT(DaeBlendSettings) convert_blend(FCDEffectStandard::TransparencyMode mode, const LColor &transparent, double transparency); pmap _materials; diff --git a/pandatool/src/flt/fltHeader.cxx b/pandatool/src/flt/fltHeader.cxx index 9816ce6f7b..db47a57ed0 100644 --- a/pandatool/src/flt/fltHeader.cxx +++ b/pandatool/src/flt/fltHeader.cxx @@ -727,12 +727,13 @@ get_color_name(int color_index) const { // including alpha. //////////////////////////////////////////////////////////////////// int FltHeader:: -get_closest_color(LColor color) const { +get_closest_color(const LColor &color0) const { // Since the colortable stores the brightest colors, with // num_color_shades scaled versions of each color implicitly // available, we really only care about the relative brightnesses of // the various components. Normalize the color in terms of the // largest of these. + LColor color = color0; double scale = 1.0; @@ -792,13 +793,14 @@ get_closest_color(LColor color) const { // ignoring alpha. //////////////////////////////////////////////////////////////////// int FltHeader:: -get_closest_rgb(LRGBColor color) const { +get_closest_rgb(const LRGBColor &color0) const { // Since the colortable stores the brightest colors, with // num_color_shades scaled versions of each color implicitly // available, we really only care about the relative brightnesses of // the various components. Normalize the color in terms of the // largest of these. + LRGBColor color = color0; double scale = 1.0; if (color[0] == 0.0 && color[1] == 0.0 && color[2] == 0.0) { diff --git a/pandatool/src/flt/fltHeader.h b/pandatool/src/flt/fltHeader.h index 1b25eb04fe..98b8f920ac 100644 --- a/pandatool/src/flt/fltHeader.h +++ b/pandatool/src/flt/fltHeader.h @@ -187,8 +187,8 @@ public: bool has_color_name(int color_index) const; string get_color_name(int color_index) const; - int get_closest_color(LColor color) const; - int get_closest_rgb(LRGBColor color) const; + int get_closest_color(const LColor &color) const; + int get_closest_rgb(const LRGBColor &color) const; int get_num_color_entries() const; int get_num_color_shades() const; diff --git a/pandatool/src/maxegg/maxEggLoader.cxx b/pandatool/src/maxegg/maxEggLoader.cxx index 4932afb4b5..75c0550298 100755 --- a/pandatool/src/maxegg/maxEggLoader.cxx +++ b/pandatool/src/maxegg/maxEggLoader.cxx @@ -364,8 +364,8 @@ public: CVertTable _cvert_tab; int GetVert(EggVertex *vert, EggGroup *context); - int GetTVert(LTexCoordd uv); - int GetCVert(LColor col); + int GetTVert(const LTexCoordd &uv); + int GetCVert(const LColor &col); int AddFace(int v0, int v1, int v2, int tv0, int tv1, int tv2, int cv0, int cv1, int cv2, int tex); EggGroup *GetControlJoint(void); }; @@ -404,7 +404,7 @@ int MaxEggMesh::GetVert(EggVertex *vert, EggGroup *context) return vtx._index; } -int MaxEggMesh::GetTVert(LTexCoordd uv) +int MaxEggMesh::GetTVert(const LTexCoordd &uv) { if (_tvert_tab.count(uv)) return _tvert_tab[uv]; @@ -418,7 +418,7 @@ int MaxEggMesh::GetTVert(LTexCoordd uv) return idx; } -int MaxEggMesh::GetCVert(LColor col) +int MaxEggMesh::GetCVert(const LColor &col) { if (_cvert_tab.count(col)) return _cvert_tab[col]; diff --git a/pandatool/src/vrmlegg/indexedFaceSet.h b/pandatool/src/vrmlegg/indexedFaceSet.h index fba341f696..c39027fe22 100644 --- a/pandatool/src/vrmlegg/indexedFaceSet.h +++ b/pandatool/src/vrmlegg/indexedFaceSet.h @@ -66,7 +66,7 @@ private: class VrmlPolygon { public: EggPolygon _attrib; - pvector _verts; + epvector _verts; }; pvector _coord_values; pvector _polys;