浏览代码

Improved boolean definitions (#2485)

pull/2486/head
Jonathan Poncelet 3 年前
committed by GitHub
父节点
当前提交
5bdd8f134f
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 4 个文件被更改,包括 6 次插入10 次删除
  1. +0
    -4
      src/raudio.c
  2. +2
    -2
      src/raylib.h
  3. +2
    -2
      src/rgestures.h
  4. +2
    -2
      src/rlgl.h

+ 0
- 4
src/raudio.c 查看文件

@ -247,10 +247,6 @@ typedef struct tagBITMAPINFOHEADER {
#include "external/dr_flac.h" // FLAC loading functions
#endif
#if defined(_MSC_VER)
#undef bool
#endif
//----------------------------------------------------------------------------------
// Defines and Macros
//----------------------------------------------------------------------------------

+ 2
- 2
src/raylib.h 查看文件

@ -177,10 +177,10 @@
// Structures Definition
//----------------------------------------------------------------------------------
// Boolean type
#if defined(__STDC__) && __STDC_VERSION__ >= 199901L
#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
#include <stdbool.h>
#elif !defined(__cplusplus) && !defined(bool)
typedef enum bool { false, true } bool;
typedef enum bool { false = 0, true = !false } bool;
#define RL_BOOL_TYPE
#endif

+ 2
- 2
src/rgestures.h 查看文件

@ -62,10 +62,10 @@
// NOTE: Below types are required for GESTURES_STANDALONE usage
//----------------------------------------------------------------------------------
// Boolean type
#if defined(__STDC__) && __STDC_VERSION__ >= 199901L
#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
#include <stdbool.h>
#elif !defined(__cplusplus) && !defined(bool) && !defined(RL_BOOL_TYPE)
typedef enum bool { false, true } bool;
typedef enum bool { false = 0, true = !false } bool;
#endif
#if !defined(RL_VECTOR2_TYPE)

+ 2
- 2
src/rlgl.h 查看文件

@ -358,11 +358,11 @@ typedef struct rlRenderBatch {
float currentDepth; // Current depth value for next draw
} rlRenderBatch;
#if defined(__STDC__) && __STDC_VERSION__ >= 199901L
#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
#include <stdbool.h>
#elif !defined(__cplusplus) && !defined(bool) && !defined(RL_BOOL_TYPE)
// Boolean type
typedef enum bool { false, true } bool;
typedef enum bool { false = 0, true = !false } bool;
#endif
#if !defined(RL_MATRIX_TYPE)

正在加载...
取消
保存