aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-06-11 12:18:08 +0200
committerraysan5 <raysan5@gmail.com>2016-06-11 12:18:08 +0200
commitc46c0fc6520914d6e9488282c02c96395d8bea9f (patch)
tree0ea7abbc1fd6fac1327fec0aee666be7639b19c5 /src
parent38847169480ea52e77a27949c139eca574ac2ba0 (diff)
downloadraylib-c46c0fc6520914d6e9488282c02c96395d8bea9f.tar.gz
raylib-c46c0fc6520914d6e9488282c02c96395d8bea9f.zip
Corrected keywords usage
Diffstat (limited to 'src')
-rw-r--r--src/physac.h8
-rw-r--r--src/raygui.h8
-rw-r--r--src/raymath.h18
3 files changed, 8 insertions, 26 deletions
diff --git a/src/physac.h b/src/physac.h
index f576ad8a..6a90dc29 100644
--- a/src/physac.h
+++ b/src/physac.h
@@ -142,10 +142,6 @@ typedef struct PhysicBodyData {
bool enabled;
} PhysicBodyData, *PhysicBody;
-#ifdef __cplusplus
-extern "C" { // Prevents name mangling of functions
-#endif
-
//----------------------------------------------------------------------------------
// Module Functions Declaration
//----------------------------------------------------------------------------------
@@ -161,10 +157,6 @@ PHYSACDEF void ApplyForceAtPosition(Vector2 position, float force, float radius)
PHYSACDEF Rectangle TransformToRectangle(Transform transform); // Convert Transform data type to Rectangle (position and scale)
-#ifdef __cplusplus
-}
-#endif
-
#endif // PHYSAC_H
diff --git a/src/raygui.h b/src/raygui.h
index f13b68cd..74f131d5 100644
--- a/src/raygui.h
+++ b/src/raygui.h
@@ -239,10 +239,6 @@ typedef enum GuiProperty {
TEXTBOX_TEXT_FONTSIZE
} GuiProperty;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
@@ -369,10 +365,6 @@ RAYGUIDEF void LoadGuiStyle(const char *fileName); // Loa
RAYGUIDEF void SetStyleProperty(int guiProperty, int value); // Set one style property
RAYGUIDEF int GetStyleProperty(int guiProperty); // Get one style property
-#ifdef __cplusplus
-}
-#endif
-
#endif // RAYGUI_H
diff --git a/src/raymath.h b/src/raymath.h
index 4075a1a9..10eabb6b 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -47,10 +47,16 @@
#include "raylib.h" // Required for structs: Vector3, Matrix
#endif
+#ifdef __cplusplus
+ #define RMEXTERN extern "C" // Functions visible from other files (no name mangling of functions in C++)
+#else
+ #define RMEXTERN extern // Functions visible from other files
+#endif
+
#if defined(RAYMATH_EXTERN_INLINE)
- #define RMDEF extern inline
+ #define RMDEF RMEXTERN inline // Functions are embeded inline (compiler generated code)
#else
- #define RMDEF extern
+ #define RMDEF RMEXTERN
#endif
//----------------------------------------------------------------------------------
@@ -105,10 +111,6 @@ typedef struct Quaternion {
#ifndef RAYMATH_EXTERN_INLINE
-#ifdef __cplusplus
-extern "C" {
-#endif
-
//------------------------------------------------------------------------------------
// Functions Declaration to work with Vector3
//------------------------------------------------------------------------------------
@@ -166,10 +168,6 @@ RMDEF Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle); // Returns
RMDEF void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle); // Returns the rotation angle and axis for a given quaternion
RMDEF void QuaternionTransform(Quaternion *q, Matrix mat); // Transform a quaternion given a transformation matrix
-#ifdef __cplusplus
-}
-#endif
-
#endif // notdef RAYMATH_EXTERN_INLINE
#endif // RAYMATH_H