summaryrefslogtreecommitdiffstats
authorDon Pellegrino <don@drexel.edu>2009-07-09 18:49:57 (GMT)
committer Don Pellegrino <don@drexel.edu>2009-07-09 18:49:57 (GMT)
commit9b7d64ada1d9c7ebd7d926efb446c613ebe24072 (patch) (side-by-side diff)
treea0930dbc4c08874786e2f9f3914328b313c96ac1
parent2ad900bdd4eda4b2558dd5ca59b0b2942b56decb (diff)
downloadexp005-9b7d64ada1d9c7ebd7d926efb446c613ebe24072.zip
exp005-9b7d64ada1d9c7ebd7d926efb446c613ebe24072.tar.gz
exp005-9b7d64ada1d9c7ebd7d926efb446c613ebe24072.tar.bz2
Removed superfluous variable and set the parameters to const.
-rw-r--r--src/controller/exp004processhits.c7
-rw-r--r--src/controller/exp004processhits.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/src/controller/exp004processhits.c b/src/controller/exp004processhits.c
index 418f23a..72daa2f 100644
--- a/src/controller/exp004processhits.c
+++ b/src/controller/exp004processhits.c
@@ -3,7 +3,6 @@
#include "../model/map_geometry.h"
#include "exp004processhits.h"
#include "selsave.h"
-#include <stdio.h>
/*
* A simple alias to make the code more readable.
@@ -15,11 +14,9 @@
* [Angel,2008,pp80-81].
*/
void
-exp004processhits (GLint hits, GLuint buffer[])
+exp004processhits (const GLint hits, const GLuint* hitlist)
{
- GLuint *hitlist = buffer;
-
- for (int i = 0; i < hits; i++)
+ for (unsigned int i = 0; i < hits; i++)
{
hitlist += 3;
diff --git a/src/controller/exp004processhits.h b/src/controller/exp004processhits.h
index d61e9a7..b0e088a 100644
--- a/src/controller/exp004processhits.h
+++ b/src/controller/exp004processhits.h
@@ -3,6 +3,6 @@
#include <GL/glut.h>
-void exp004processhits (GLint hits, GLuint buffer[]);
+void exp004processhits (const GLint hits, const GLuint *hitlist);
#endif // EXP004PROCESSHITS_H

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.