[gnome-games/cplusplus] gnometris: Try using more sane polymorphism
- From: Jason Clinton <jclinton src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/cplusplus] gnometris: Try using more sane polymorphism
- Date: Fri, 8 May 2009 17:43:16 -0400 (EDT)
commit f371466b3678c3026aee559ae64f8d4f6396581d
Author: Jason D. Clinton <me jasonclinton com>
Date: Fri May 8 16:42:31 2009 -0500
gnometris: Try using more sane polymorphism
---
gnometris/renderer.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnometris/renderer.cpp b/gnometris/renderer.cpp
index 9b93fd5..0167d61 100644
--- a/gnometris/renderer.cpp
+++ b/gnometris/renderer.cpp
@@ -59,16 +59,16 @@ Renderer * rendererFactory (gint id, gint pxw, gint pxh)
switch (id) {
case 2:
tmp = new TangoBlock (pxw, pxh, TRUE);
- ((TangoBlock*)tmp)->rescaleCache (pxw, pxh);
+ break;
case 1:
tmp = new TangoBlock (pxw, pxh, FALSE);
- ((TangoBlock*)tmp)->rescaleCache (pxw, pxh);
+ break;
case 0:
default:
tmp = new Renderer (pxw, pxh);
- tmp->rescaleCache (pxw, pxh);
+ break;
}
-
+ tmp->rescaleCache (pxw, pxh);
return tmp;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]