From a52b456bfa63e1b49ce5c5c03d0f671562dcab9e Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 28 Jan 2009 18:51:14 +0000 Subject: [PATCH] updated Makefile to use -O1 in CXXFLAGS instead of -O3; -O2 and above currently break the app git-svn-id: svn://anubis/fart/trunk@61 7f9b0f55-74a9-4bce-be96-3c2cd072584d --- Makefile | 2 +- main/Scene.cc | 3 +-- shapes/Sphere.cc | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 06ce9ff..7ff76fc 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ export CPPFLAGS += -I"$(shell cd)" else export CPPFLAGS += -I"$(shell pwd)" endif -export CXXFLAGS := -Wall -O3 +export CXXFLAGS := -Wall -O1 all: $(TARGET) diff --git a/main/Scene.cc b/main/Scene.cc index 6001c2a..55327af 100644 --- a/main/Scene.cc +++ b/main/Scene.cc @@ -196,8 +196,7 @@ vector Scene::getRayHits(const Ray & ray) { minSolidDist = intersect_dist; } - if (minSolidDist == 0.0 - || minSolidDist >= intersect_dist) + if (minSolidDist == 0.0 || minSolidDist >= intersect_dist) { hits.push_back(ShapeDistance(*it, intersect_dist)); } diff --git a/shapes/Sphere.cc b/shapes/Sphere.cc index 045a681..e3aaea6 100644 --- a/shapes/Sphere.cc +++ b/shapes/Sphere.cc @@ -38,9 +38,8 @@ Shape::IntersectList Sphere::intersect(const Ray & ray) Vector Sphere::getNormalAt(const Vector & pt) { - Vector pt_inv = m_inverse.transform_point(pt); + Vector normal = m_inverse.transform_point(pt); - Vector normal = pt_inv; normal.normalize(); return m_transform.transform_normal(normal);