summaryrefslogtreecommitdiffhomepage
path: root/src/rlgl.h
diff options
context:
space:
mode:
authorRay <[email protected]>2018-10-16 10:53:01 +0200
committerRay <[email protected]>2018-10-16 10:53:01 +0200
commitb8b8936cd780b34edb2899eb32b756a1aebef9d3 (patch)
tree9425ee9c0a68a75f60c7d54da9601aceabef4df2 /src/rlgl.h
parentf56617392705b47f6108ddf024e2b803e48bcb3f (diff)
downloadraylib-b8b8936cd780b34edb2899eb32b756a1aebef9d3.tar.gz
raylib-b8b8936cd780b34edb2899eb32b756a1aebef9d3.zip
Review defines
Diffstat (limited to 'src/rlgl.h')
-rw-r--r--src/rlgl.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 61834f83..d2b52a47 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -378,7 +378,7 @@ typedef unsigned char byte;
} VrDevice;
#endif
-#ifdef __cplusplus
+#if defined(__cplusplus)
extern "C" { // Prevents name mangling of functions
#endif
@@ -516,7 +516,7 @@ void TraceLog(int msgType, const char *text, ...); // Show trace log messag
int GetPixelDataSize(int width, int height, int format);// Get pixel data size in bytes (image or texture)
#endif
-#ifdef __cplusplus
+#if defined(__cplusplus)
}
#endif
@@ -553,7 +553,7 @@ int GetPixelDataSize(int width, int height, int format);// Get pixel data size i
#else
// APIENTRY for OpenGL function pointer declarations is required
#ifndef APIENTRY
- #ifdef _WIN32
+ #if defined(_WIN32)
#define APIENTRY __stdcall
#else
#define APIENTRY
@@ -1620,7 +1620,7 @@ void rlglInit(int width, int height)
// NOTE: We don't need to check again supported extensions but we do (GLAD already dealt with that)
glGetIntegerv(GL_NUM_EXTENSIONS, &numExt);
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
const char **extList = malloc(sizeof(const char *)*numExt);
#else
const char *extList[numExt];
@@ -3803,7 +3803,7 @@ static unsigned int LoadShaderProgram(unsigned int vShaderId, unsigned int fShad
glGetProgramiv(program, GL_INFO_LOG_LENGTH, &maxLength);
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
char *log = malloc(maxLength);
#else
char log[maxLength];
@@ -3812,7 +3812,7 @@ static unsigned int LoadShaderProgram(unsigned int vShaderId, unsigned int fShad
TraceLog(LOG_INFO, "%s", log);
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
free(log);
#endif
glDeleteProgram(program);