summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2019-01-21 10:32:14 +0100
committerRay <[email protected]>2019-01-21 10:32:14 +0100
commit4467292a2d5a5e0fbe2c3a28f8ffb1480c7b66ed (patch)
tree8768e9873ad6d050f9ff66a1eadb7bde24676f5a /src
parente91c84e33a5ae1ab3a963445b545bbcde2298224 (diff)
downloadraylib-4467292a2d5a5e0fbe2c3a28f8ffb1480c7b66ed.tar.gz
raylib-4467292a2d5a5e0fbe2c3a28f8ffb1480c7b66ed.zip
Review last PR formatting
Diffstat (limited to 'src')
-rw-r--r--src/raylib.h12
-rw-r--r--src/utils.c14
2 files changed, 12 insertions, 14 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 11fe145b..f104ada8 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -423,14 +423,14 @@ typedef enum {
// Trace log type
typedef enum {
- LOG_ALL, // Display all logs
+ LOG_ALL, // Display all logs
LOG_TRACE,
LOG_DEBUG,
LOG_INFO,
LOG_WARNING,
LOG_ERROR,
LOG_FATAL,
- LOG_NONE // Disable logging
+ LOG_NONE // Disable logging
} TraceLogType;
// Keyboard keys
@@ -900,10 +900,10 @@ RLAPI Color Fade(Color color, float alpha); // Color fade-
// Misc. functions
RLAPI void SetConfigFlags(unsigned char flags); // Setup window configuration flags (view FLAGS)
-RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level.
-RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level.
-RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging bypassing raylib's one
-RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
+RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level
+RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level
+RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging
+RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
diff --git a/src/utils.c b/src/utils.c
index ffce11fb..9bf91896 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -66,8 +66,7 @@ AAssetManager *assetManager;
//----------------------------------------------------------------------------------
#if defined(PLATFORM_ANDROID)
/* This should be in <stdio.h>, but Travis doesn't find it... */
-FILE *funopen(const void *cookie, int (*readfn)(void *, char *, int),
- int (*writefn)(void *, const char *, int),
+FILE *funopen(const void *cookie, int (*readfn)(void *, char *, int), int (*writefn)(void *, const char *, int),
fpos_t (*seekfn)(void *, fpos_t, int), int (*closefn)(void *));
static int android_read(void *cookie, char *buf, int size);
@@ -80,19 +79,19 @@ static int android_close(void *cookie);
// Module Functions Definition - Utilities
//----------------------------------------------------------------------------------
-// Set the current threshold (minimum) log level.
+// Set the current threshold (minimum) log level
void SetTraceLogLevel(int logType)
{
logTypeLevel = logType;
}
-// Set the exit threshold (minimum) log level.
+// Set the exit threshold (minimum) log level
void SetTraceLogExit(int logType)
{
logTypeExit = logType;
}
-// Set a trace log callback to enable custom logging bypassing raylib's one
+// Set a trace log callback to enable custom logging
void SetTraceLogCallback(TraceLogCallback callback)
{
logCallback = callback;
@@ -102,9 +101,8 @@ void SetTraceLogCallback(TraceLogCallback callback)
void TraceLog(int logType, const char *text, ...)
{
#if defined(SUPPORT_TRACELOG)
- if (logType < logTypeLevel) { // Message has level below current threshold, don't emit.
- return;
- }
+ // Message has level below current threshold, don't emit
+ if (logType < logTypeLevel) return;
va_list args;
va_start(args, text);