mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
squelch compiler warnings
This commit is contained in:
parent
57b6ad6c15
commit
5785c5888e
@ -540,8 +540,8 @@ build_geoms(InputIterator first, InputIterator last,
|
|||||||
GeomBindType bind_colors = G_OVERALL;
|
GeomBindType bind_colors = G_OVERALL;
|
||||||
GeomBindType bind_texcoords = G_PER_VERTEX;
|
GeomBindType bind_texcoords = G_PER_VERTEX;
|
||||||
|
|
||||||
NType overall_normal;
|
NType overall_normal(0);
|
||||||
CType overall_color;
|
CType overall_color(0);
|
||||||
bool first_normal = true;
|
bool first_normal = true;
|
||||||
bool first_color = true;
|
bool first_color = true;
|
||||||
|
|
||||||
|
@ -730,7 +730,6 @@ sort_value() const {
|
|||||||
template <class VTX>
|
template <class VTX>
|
||||||
class SameCoord {
|
class SameCoord {
|
||||||
public:
|
public:
|
||||||
SameCoord() {}
|
|
||||||
bool operator () (const VTX &a, const VTX &b) const {
|
bool operator () (const VTX &a, const VTX &b) const {
|
||||||
return a.get_coord() == b.get_coord();
|
return a.get_coord() == b.get_coord();
|
||||||
}
|
}
|
||||||
@ -750,7 +749,11 @@ public:
|
|||||||
template <class VTX>
|
template <class VTX>
|
||||||
void BuilderPrimTempl<VTX>::
|
void BuilderPrimTempl<VTX>::
|
||||||
remove_doubled_verts(int closed) {
|
remove_doubled_verts(int closed) {
|
||||||
SameCoord<Vertex> sc;
|
// For some reason, writing this variable declaration this way
|
||||||
|
// prevents VC++ from generating dozens of spurious "local variable
|
||||||
|
// 'sc' used without having been initialized" warning messages.
|
||||||
|
SameCoord<Vertex> sc = SameCoord<Vertex>();
|
||||||
|
|
||||||
Verts::iterator new_end = unique(_verts.begin(), _verts.end(), sc);
|
Verts::iterator new_end = unique(_verts.begin(), _verts.end(), sc);
|
||||||
_verts.erase(new_end, _verts.end());
|
_verts.erase(new_end, _verts.end());
|
||||||
|
|
||||||
|
@ -371,6 +371,7 @@ triangulate_poly(EggGroupNode *container, bool convex_also) {
|
|||||||
/* select largest signed area */
|
/* select largest signed area */
|
||||||
max = 0.0;
|
max = 0.0;
|
||||||
index = 0;
|
index = 0;
|
||||||
|
flag = 0;
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
if (as[i] >= 0.0) {
|
if (as[i] >= 0.0) {
|
||||||
if (as[i] > max) {
|
if (as[i] > max) {
|
||||||
@ -400,7 +401,7 @@ triangulate_poly(EggGroupNode *container, bool convex_also) {
|
|||||||
y = 2;
|
y = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
default: // case 2
|
||||||
x = 1;
|
x = 1;
|
||||||
y = 2;
|
y = 2;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user