summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Campbell <ben@scumways.com>2015-07-19 22:48:42 +1200
committerBen Campbell <ben@scumways.com>2015-07-19 22:48:42 +1200
commit064fd14bcd01c722bfc524fe700e6b58356f928a (patch)
tree6b79d3ae5a820f263d88cd8d1340362f5dcb64c7
parent6b584f13be9d51e65c9bd0edf5fc6c5edee4d8e1 (diff)
downloaddevil-064fd14bcd01c722bfc524fe700e6b58356f928a.tar.gz
ILU: make inlines static
-rw-r--r--DevIL/CMakeLists.txt4
-rw-r--r--DevIL/src-ILU/include/ilu_internal.h19
2 files changed, 5 insertions, 18 deletions
diff --git a/DevIL/CMakeLists.txt b/DevIL/CMakeLists.txt
index 604137be..ac428955 100644
--- a/DevIL/CMakeLists.txt
+++ b/DevIL/CMakeLists.txt
@@ -75,8 +75,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/IL/config.h.cmake.in ${CMAKE_
#)
add_subdirectory(src-IL)
-#add_subdirectory(src-ILU)
-#add_subdirectory(src-ILUT)
+add_subdirectory(src-ILU)
+add_subdirectory(src-ILUT)
# need to check for vc6 or vc2003 output dir
diff --git a/DevIL/src-ILU/include/ilu_internal.h b/DevIL/src-ILU/include/ilu_internal.h
index 61980e6e..32fc8368 100644
--- a/DevIL/src-ILU/include/ilu_internal.h
+++ b/DevIL/src-ILU/include/ilu_internal.h
@@ -65,31 +65,18 @@ extern const ILdouble IL_PI;
extern const ILdouble IL_DEGCONV;
-#ifdef ILU_INTERNAL_C
-#undef NOINLINE
-#undef INLINE
-#define INLINE
-#endif
-
-// Internal functions
-ILfloat ilCos(ILfloat Angle);
-ILfloat ilSin(ILfloat Angle);
-ILint ilRound(ILfloat Num);
-
-#ifndef NOINLINE
-INLINE ILfloat ilCos(ILfloat Angle) {
+STATIC_INLINE ILfloat ilCos(ILfloat Angle) {
return (ILfloat)(cos(Angle * IL_DEGCONV));
}
-INLINE ILfloat ilSin(ILfloat Angle) {
+STATIC_INLINE ILfloat ilSin(ILfloat Angle) {
return (ILfloat)(sin(Angle * IL_DEGCONV));
}
-INLINE ILint ilRound(ILfloat Num) {
+STATIC_INLINE ILint ilRound(ILfloat Num) {
return (ILint)(Num + 0.5); // this is truncating in away-from-0, not rounding
}
-#endif