squelch compiler warnings

This commit is contained in:
David Rose 2001-08-07 16:29:18 +00:00
parent 4343bb8c98
commit 2f5efeaf6a
4 changed files with 20 additions and 24 deletions

View File

@ -189,22 +189,17 @@ output(ostream &out) const {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void Material:: void Material::
write(ostream &out, int indent_level) const { write(ostream &out, int indent_level) const {
bool any = false;
if (has_ambient()) { if (has_ambient()) {
indent(out, indent_level) << "ambient = " << get_ambient() << "\n"; indent(out, indent_level) << "ambient = " << get_ambient() << "\n";
any = true;
} }
if (has_diffuse()) { if (has_diffuse()) {
indent(out, indent_level) << "diffuse = " << get_diffuse() << "\n"; indent(out, indent_level) << "diffuse = " << get_diffuse() << "\n";
any = true;
} }
if (has_specular()) { if (has_specular()) {
indent(out, indent_level) << "specular = " << get_specular() << "\n"; indent(out, indent_level) << "specular = " << get_specular() << "\n";
any = true;
} }
if (has_emission()) { if (has_emission()) {
indent(out, indent_level) << "emission = " << get_emission() << "\n"; indent(out, indent_level) << "emission = " << get_emission() << "\n";
any = true;
} }
indent(out, indent_level) << "shininess = " << get_shininess() << "\n"; indent(out, indent_level) << "shininess = " << get_shininess() << "\n";
indent(out, indent_level) << "local = " << get_local() << "\n"; indent(out, indent_level) << "local = " << get_local() << "\n";

View File

@ -148,7 +148,8 @@ kill_particle(int) {
Colorf PointParticleRenderer:: Colorf PointParticleRenderer::
create_color(const BaseParticle *p) { create_color(const BaseParticle *p) {
Colorf color; Colorf color;
float life_t, vel_t, parameterized_age; float life_t, vel_t;
float parameterized_age = 1.0f;
bool have_alpha_t = false; bool have_alpha_t = false;
switch (_blend_type) { switch (_blend_type) {

View File

@ -326,14 +326,14 @@ enqueue_object(TypedWritable *object) {
// We need to assign a unique index number to every object we write // We need to assign a unique index number to every object we write
// out. Has this object been assigned a number yet? // out. Has this object been assigned a number yet?
int object_id; int object_id;
bool already_written; // bool already_written;
StateMap::iterator si = _state_map.find(object); StateMap::iterator si = _state_map.find(object);
if (si == _state_map.end()) { if (si == _state_map.end()) {
// No, it hasn't, so assign it the next number in sequence // No, it hasn't, so assign it the next number in sequence
// arbitrarily. // arbitrarily.
object_id = _next_object_id; object_id = _next_object_id;
already_written = false; // already_written = false;
// Make sure our object ID will fit within the PN_uint16 we have // Make sure our object ID will fit within the PN_uint16 we have
// allocated for it. // allocated for it.
@ -347,7 +347,7 @@ enqueue_object(TypedWritable *object) {
} else { } else {
// Yes, it has; get the object ID. // Yes, it has; get the object ID.
object_id = (*si).second._object_id; object_id = (*si).second._object_id;
already_written = (*si).second._written; // already_written = (*si).second._written;
} }
_object_queue.push_back(object); _object_queue.push_back(object);