From 8ddb049bf9cb06c377857ab46b7af23c140f12a7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 12 Jan 2011 07:53:41 +0000 Subject: [PATCH] Add extern "C" to arraysize.h Add some missing const qualifiers to casts --- flavors/gl/source/inspector.cpp | 6 +++--- source/arraysize.h | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/flavors/gl/source/inspector.cpp b/flavors/gl/source/inspector.cpp index 87adf17..5dcdf41 100644 --- a/flavors/gl/source/inspector.cpp +++ b/flavors/gl/source/inspector.cpp @@ -148,11 +148,11 @@ void Inspector::cmd_buffer(const string &args) line = " "; if(array.type==GL_UNSIGNED_BYTE) - line += format(fmt, *(reinterpret_cast(ptr)+i)); + line += format(fmt, *(reinterpret_cast(ptr)+i)); else if(array.type==GL_UNSIGNED_SHORT) - line += format(fmt, *(reinterpret_cast(ptr)+i)); + line += format(fmt, *(reinterpret_cast(ptr)+i)); else if(array.type==GL_UNSIGNED_INT) - line += format(fmt, *(reinterpret_cast(ptr)+i)); + line += format(fmt, *(reinterpret_cast(ptr)+i)); if(line.size()+1+width>79) { diff --git a/source/arraysize.h b/source/arraysize.h index 56f0826..23479d9 100644 --- a/source/arraysize.h +++ b/source/arraysize.h @@ -10,9 +10,17 @@ Distributed under the GPL #include "opengl.h" -extern int typesize(GLenum); -extern int formatsize(GLenum); -extern int paramsize(GLenum); -extern int buffersize(GLenum); +#ifdef __cplusplus +extern "C" { +#endif + +int typesize(GLenum); +int formatsize(GLenum); +int paramsize(GLenum); +int buffersize(GLenum); + +#ifdef __cplusplus +} +#endif #endif -- 2.45.2