author | Don Pellegrino <don@drexel.edu> | 2009-07-09 18:49:57 (GMT) |
---|---|---|
committer | Don Pellegrino <don@drexel.edu> | 2009-07-09 18:49:57 (GMT) |
commit | 9b7d64ada1d9c7ebd7d926efb446c613ebe24072 (patch) (unidiff) | |
tree | a0930dbc4c08874786e2f9f3914328b313c96ac1 | |
parent | 2ad900bdd4eda4b2558dd5ca59b0b2942b56decb (diff) | |
download | exp005-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.c | 7 | ||||
-rw-r--r-- | src/controller/exp004processhits.h | 2 |
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 @@ | |||
3 | #include "../model/map_geometry.h" | 3 | #include "../model/map_geometry.h" |
4 | #include "exp004processhits.h" | 4 | #include "exp004processhits.h" |
5 | #include "selsave.h" | 5 | #include "selsave.h" |
6 | #include <stdio.h> | ||
7 | 6 | ||
8 | /* | 7 | /* |
9 | * A simple alias to make the code more readable. | 8 | * A simple alias to make the code more readable. |
@@ -15,11 +14,9 @@ | |||
15 | * [Angel,2008,pp80-81]. | 14 | * [Angel,2008,pp80-81]. |
16 | */ | 15 | */ |
17 | void | 16 | void |
18 | exp004processhits (GLint hits, GLuint buffer[]) | 17 | exp004processhits (const GLint hits, const GLuint* hitlist) |
19 | { | 18 | { |
20 | GLuint *hitlist = buffer; | 19 | for (unsigned int i = 0; i < hits; i++) |
21 | |||
22 | for (int i = 0; i < hits; i++) | ||
23 | { | 20 | { |
24 | hitlist += 3; | 21 | hitlist += 3; |
25 | 22 | ||
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 @@ | |||
3 | 3 | ||
4 | #include <GL/glut.h> | 4 | #include <GL/glut.h> |
5 | 5 | ||
6 | void exp004processhits (GLint hits, GLuint buffer[]); | 6 | void exp004processhits (const GLint hits, const GLuint *hitlist); |
7 | 7 | ||
8 | #endif // EXP004PROCESSHITS_H | 8 | #endif // EXP004PROCESSHITS_H |