squelch compiler warnings

This commit is contained in:
David Rose 2001-08-07 03:59:13 +00:00
parent 57b6ad6c15
commit 5785c5888e
3 changed files with 9 additions and 5 deletions

View File

@ -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;

View File

@ -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());

View File

@ -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;