Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ACGL
acgl
Commits
bd3d17c6
Commit
bd3d17c6
authored
Apr 05, 2013
by
Robert Menzel
Browse files
reduced compiler warnings in RGBE loader
parent
ecbe0c85
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.TXT
View file @
bd3d17c6
...
...
@@ -8,7 +8,7 @@ Included third-party software:
* Includes OpenGL loader code created by a modified glLoadGen by Jason McKesson.
* Includes GLM by Christophe Riccio.
* Includes data type definitions from libspnav header originally by John Tsiombikas (see mini_spnav.h for details).
* Includes RGBE/Radiance image import by Bruce Walter (code provided 'as-is').
* Includes RGBE/Radiance image import by Bruce Walter (code provided 'as-is')
minimally adjusted to reduce compiler warnings
.
See LICENSE.TXT for licensing information.
...
...
src/rgbe/rgbe.cc
View file @
bd3d17c6
...
...
@@ -22,6 +22,9 @@
feel free to modify it to suit your needs.
(Place notice here if you modified the code.)
Ok: Made minimal changes (char* -> const char*) to reduce compiler warnings.
- Robert Menzel mail@renderingpipeline.com
posted to http://www.graphics.cornell.edu/~bjw/
written by Bruce Walter (bjw@graphics.cornell.edu) 5/26/95
based on code written by Greg Ward
...
...
@@ -44,7 +47,7 @@ enum rgbe_error_codes {
};
/* default error routine. change this to change error handling */
static
int
rgbe_error
(
int
rgbe_error_code
,
char
*
msg
)
static
int
rgbe_error
(
int
rgbe_error_code
,
const
char
*
msg
)
{
switch
(
rgbe_error_code
)
{
case
rgbe_read_error
:
...
...
@@ -107,7 +110,7 @@ rgbe2float(float *red, float *green, float *blue, unsigned char rgbe[4])
/* default minimal header. modify if you want more information in header */
int
RGBE_WriteHeader
(
FILE
*
fp
,
int
width
,
int
height
,
rgbe_header_info
*
info
)
{
char
*
programtype
=
"RGBE"
;
const
char
*
programtype
=
"RGBE"
;
if
(
info
&&
(
info
->
valid
&
RGBE_VALID_PROGRAMTYPE
))
programtype
=
info
->
programtype
;
...
...
@@ -133,11 +136,11 @@ int RGBE_WriteHeader(FILE *fp, int width, int height, rgbe_header_info *info)
int
RGBE_ReadHeader
(
FILE
*
fp
,
int
*
width
,
int
*
height
,
rgbe_header_info
*
info
)
{
char
buf
[
128
];
int
found_format
;
//
int found_format;
float
tempf
;
in
t
i
;
size_
t
i
;
found_format
=
0
;
//
found_format = 0;
if
(
info
)
{
info
->
valid
=
0
;
info
->
programtype
[
0
]
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment