mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -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_texcoords = G_PER_VERTEX;
|
||||
|
||||
NType overall_normal;
|
||||
CType overall_color;
|
||||
NType overall_normal(0);
|
||||
CType overall_color(0);
|
||||
bool first_normal = true;
|
||||
bool first_color = true;
|
||||
|
||||
|
@ -730,7 +730,6 @@ sort_value() const {
|
||||
template <class VTX>
|
||||
class SameCoord {
|
||||
public:
|
||||
SameCoord() {}
|
||||
bool operator () (const VTX &a, const VTX &b) const {
|
||||
return a.get_coord() == b.get_coord();
|
||||
}
|
||||
@ -750,7 +749,11 @@ public:
|
||||
template <class VTX>
|
||||
void BuilderPrimTempl<VTX>::
|
||||
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.erase(new_end, _verts.end());
|
||||
|
||||
|
@ -371,6 +371,7 @@ triangulate_poly(EggGroupNode *container, bool convex_also) {
|
||||
/* select largest signed area */
|
||||
max = 0.0;
|
||||
index = 0;
|
||||
flag = 0;
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (as[i] >= 0.0) {
|
||||
if (as[i] > max) {
|
||||
@ -400,7 +401,7 @@ triangulate_poly(EggGroupNode *container, bool convex_also) {
|
||||
y = 2;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
default: // case 2
|
||||
x = 1;
|
||||
y = 2;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user