]> git.tdb.fi Git - gldbg.git/commitdiff
Add extern "C" to arraysize.h
authorMikko Rasa <tdb@tdb.fi>
Wed, 12 Jan 2011 07:53:41 +0000 (07:53 +0000)
committerMikko Rasa <tdb@tdb.fi>
Wed, 12 Jan 2011 07:53:41 +0000 (07:53 +0000)
Add some missing const qualifiers to casts

flavors/gl/source/inspector.cpp
source/arraysize.h

index 87adf17f5f593918f1ce005b9ef39028576ca99f..5dcdf4147d3a6b670ffe8b57750a5ad256c993af 100644 (file)
@@ -148,11 +148,11 @@ void Inspector::cmd_buffer(const string &args)
                                        line = "   ";
 
                                if(array.type==GL_UNSIGNED_BYTE)
-                                       line += format(fmt, *(reinterpret_cast<unsigned char *>(ptr)+i));
+                                       line += format(fmt, *(reinterpret_cast<const unsigned char *>(ptr)+i));
                                else if(array.type==GL_UNSIGNED_SHORT)
-                                       line += format(fmt, *(reinterpret_cast<unsigned short *>(ptr)+i));
+                                       line += format(fmt, *(reinterpret_cast<const unsigned short *>(ptr)+i));
                                else if(array.type==GL_UNSIGNED_INT)
-                                       line += format(fmt, *(reinterpret_cast<unsigned *>(ptr)+i));
+                                       line += format(fmt, *(reinterpret_cast<const unsigned *>(ptr)+i));
 
                                if(line.size()+1+width>79)
                                {
index 56f08263f052f184a88b127c4f20bbd0d086c352..23479d935d7743aaaf88c375550c44959d255da4 100644 (file)
@@ -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