On Fri, Jun 22, 2012 at 10:05:45PM +0530, shirish शिरीष wrote:
> Thank you for getting back to me. I'm not a programmer, can you tell
> me what I need to do on the CLI so that the error does not happen.
> I'll be happy to wait for awhile (or few days) as and when you fix
> whatever it is that needs fixing, just reply to me when you have fixed
> it.

Hi shirish,

I've removed the exception now, after analyzing the code.  I need Josh
to commit it to the main git tree, since Kai is on vacation, but I've
attached the patch for you, in case you wish to go that route.

Otherwise, check the official git in a day or two, and it should be fixed.

Thanks for the report!

- Chris

>From 1de19a3fdbe64bb41d3ded3a2b5ac03a0a687484 Mon Sep 17 00:00:00 2001
From: Chris Frey <cdf...@foursquare.net>
Date: Fri, 22 Jun 2012 19:26:02 -0400
Subject: [PATCH] world: removed the exception from renderer.cc

After analyzing the code, all possible cases are handled in the switch
statement, but the compiler is not always smart enough to figure that
out (and it took me a while too).  :-)  So, for the "should never happen"
case, add a default: case under case 0, which displays debug output,
which is a suitable response.

This removes the exception I added before to fix compile issues, and
adonthell should now compile again when exception are turned off.
---
 src/world/renderer.cc |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/world/renderer.cc b/src/world/renderer.cc
index 36f09d7..50a1cc3 100644
--- a/src/world/renderer.cc
+++ b/src/world/renderer.cc
@@ -337,6 +337,7 @@ bool default_renderer::is_object_below (const render_info & 
obj, const render_in
         switch (res)
         {
             case 0:
+            default:
             {                
                 // fprintf (stderr, "*** default_renderer::is_object_below: 
total intersection of objects!\n"); // E
                 // fprintf (stderr, "    [%i, %i, %i] - [%i, %i, %i]\n", 
min_x, min_y, min_z, max_x, max_y, max_z);
@@ -379,8 +380,6 @@ bool default_renderer::is_object_below (const render_info & 
obj, const render_in
             }
         }
     }
-
-    throw "This should never happen.";
 }
 
 // debug rendering
-- 
1.7.10.4

_______________________________________________
Adonthell-general mailing list
Adonthell-general@nongnu.org
https://lists.nongnu.org/mailman/listinfo/adonthell-general

Reply via email to