Replace a few #if/#elif with #ifdef and "#elif defined"
This commit is contained in:
parent
9c3ddf05cb
commit
ad2127a3e8
11 changed files with 17 additions and 17 deletions
|
@ -65,7 +65,7 @@ private:
|
||||||
const Pair *a = _cowdata.ptr();
|
const Pair *a = _cowdata.ptr();
|
||||||
int middle = 0;
|
int middle = 0;
|
||||||
|
|
||||||
#if DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (low > high)
|
if (low > high)
|
||||||
ERR_PRINT("low > high, this may be a bug");
|
ERR_PRINT("low > high, this may be a bug");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -50,7 +50,7 @@ class VSet {
|
||||||
const T *a = &_data[0];
|
const T *a = &_data[0];
|
||||||
int middle = 0;
|
int middle = 0;
|
||||||
|
|
||||||
#if DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (low > high)
|
if (low > high)
|
||||||
ERR_PRINT("low > high, this may be a bug");
|
ERR_PRINT("low > high, this may be a bug");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "pluginscript_instance.h"
|
#include "pluginscript_instance.h"
|
||||||
#include "pluginscript_script.h"
|
#include "pluginscript_script.h"
|
||||||
|
|
||||||
#if DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
#define __ASSERT_SCRIPT_REASON "Cannot retrieve pluginscript class for this script, is you code correct ?"
|
#define __ASSERT_SCRIPT_REASON "Cannot retrieve pluginscript class for this script, is you code correct ?"
|
||||||
#define ASSERT_SCRIPT_VALID() \
|
#define ASSERT_SCRIPT_VALID() \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
@ -597,7 +597,7 @@ Error GDScript::reload(bool p_keep_state) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
for (const List<GDScriptWarning>::Element *E = parser.get_warnings().front(); E; E = E->next()) {
|
for (const List<GDScriptWarning>::Element *E = parser.get_warnings().front(); E; E = E->next()) {
|
||||||
const GDScriptWarning &warning = E->get();
|
const GDScriptWarning &warning = E->get();
|
||||||
if (ScriptDebugger::get_singleton()) {
|
if (ScriptDebugger::get_singleton()) {
|
||||||
|
|
|
@ -502,11 +502,11 @@ GodotSharpEditor::GodotSharpEditor(EditorNode *p_editor) {
|
||||||
|
|
||||||
String settings_hint_str = "Disabled";
|
String settings_hint_str = "Disabled";
|
||||||
|
|
||||||
#ifdef WINDOWS_ENABLED
|
#if defined(WINDOWS_ENABLED)
|
||||||
settings_hint_str += ",MonoDevelop,Visual Studio Code";
|
settings_hint_str += ",MonoDevelop,Visual Studio Code";
|
||||||
#elif OSX_ENABLED
|
#elif defined(OSX_ENABLED)
|
||||||
settings_hint_str += ",Visual Studio,MonoDevelop,Visual Studio Code";
|
settings_hint_str += ",Visual Studio,MonoDevelop,Visual Studio Code";
|
||||||
#elif UNIX_ENABLED
|
#elif defined(UNIX_ENABLED)
|
||||||
settings_hint_str += ",MonoDevelop,Visual Studio Code";
|
settings_hint_str += ",MonoDevelop,Visual Studio Code";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -81,15 +81,15 @@ public:
|
||||||
|
|
||||||
enum ExternalEditor {
|
enum ExternalEditor {
|
||||||
EDITOR_NONE,
|
EDITOR_NONE,
|
||||||
#ifdef WINDOWS_ENABLED
|
#if defined(WINDOWS_ENABLED)
|
||||||
//EDITOR_VISUALSTUDIO, // TODO
|
//EDITOR_VISUALSTUDIO, // TODO
|
||||||
EDITOR_MONODEVELOP,
|
EDITOR_MONODEVELOP,
|
||||||
EDITOR_VSCODE
|
EDITOR_VSCODE
|
||||||
#elif OSX_ENABLED
|
#elif defined(OSX_ENABLED)
|
||||||
EDITOR_VISUALSTUDIO_MAC,
|
EDITOR_VISUALSTUDIO_MAC,
|
||||||
EDITOR_MONODEVELOP,
|
EDITOR_MONODEVELOP,
|
||||||
EDITOR_VSCODE
|
EDITOR_VSCODE
|
||||||
#elif UNIX_ENABLED
|
#elif defined(UNIX_ENABLED)
|
||||||
EDITOR_MONODEVELOP,
|
EDITOR_MONODEVELOP,
|
||||||
EDITOR_VSCODE
|
EDITOR_VSCODE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -212,7 +212,7 @@ void GDMono::initialize() {
|
||||||
String config_dir;
|
String config_dir;
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
#ifdef WINDOWS_ENABLED
|
#if defined(WINDOWS_ENABLED)
|
||||||
mono_reg_info = MonoRegUtils::find_mono();
|
mono_reg_info = MonoRegUtils::find_mono();
|
||||||
|
|
||||||
if (mono_reg_info.assembly_dir.length() && DirAccess::exists(mono_reg_info.assembly_dir)) {
|
if (mono_reg_info.assembly_dir.length() && DirAccess::exists(mono_reg_info.assembly_dir)) {
|
||||||
|
@ -222,7 +222,7 @@ void GDMono::initialize() {
|
||||||
if (mono_reg_info.config_dir.length() && DirAccess::exists(mono_reg_info.config_dir)) {
|
if (mono_reg_info.config_dir.length() && DirAccess::exists(mono_reg_info.config_dir)) {
|
||||||
config_dir = mono_reg_info.config_dir;
|
config_dir = mono_reg_info.config_dir;
|
||||||
}
|
}
|
||||||
#elif OSX_ENABLED
|
#elif defined(OSX_ENABLED)
|
||||||
const char *c_assembly_rootdir = mono_assembly_getrootdir();
|
const char *c_assembly_rootdir = mono_assembly_getrootdir();
|
||||||
const char *c_config_dir = mono_get_config_dir();
|
const char *c_config_dir = mono_get_config_dir();
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#error Platform or compiler not supported
|
#error Platform or compiler not supported
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_GCC___THREAD
|
#ifdef HAVE_GCC___THREAD
|
||||||
#define _THREAD_LOCAL_(m_t) __thread m_t
|
#define _THREAD_LOCAL_(m_t) __thread m_t
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
#define USE_CUSTOM_THREAD_LOCAL
|
#define USE_CUSTOM_THREAD_LOCAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif _MSC_VER
|
#elif defined(_MSC_VER)
|
||||||
|
|
||||||
#ifdef HAVE_DECLSPEC_THREAD
|
#ifdef HAVE_DECLSPEC_THREAD
|
||||||
#define _THREAD_LOCAL_(m_t) __declspec(thread) m_t
|
#define _THREAD_LOCAL_(m_t) __declspec(thread) m_t
|
||||||
|
|
|
@ -95,7 +95,7 @@ void Path2D::_notification(int p_what) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
const float line_width = 2 * EDSCALE;
|
const float line_width = 2 * EDSCALE;
|
||||||
#else
|
#else
|
||||||
const float line_width = 2;
|
const float line_width = 2;
|
||||||
|
|
|
@ -1466,7 +1466,7 @@ int Animation::_find(const Vector<K> &p_keys, float p_time) const {
|
||||||
int high = len - 1;
|
int high = len - 1;
|
||||||
int middle = 0;
|
int middle = 0;
|
||||||
|
|
||||||
#if DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (low > high)
|
if (low > high)
|
||||||
ERR_PRINT("low > high, this may be a bug");
|
ERR_PRINT("low > high, this may be a bug");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -91,7 +91,7 @@ public:
|
||||||
int high = points.size() - 1;
|
int high = points.size() - 1;
|
||||||
int middle = 0;
|
int middle = 0;
|
||||||
|
|
||||||
#if DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (low > high)
|
if (low > high)
|
||||||
ERR_PRINT("low > high, this may be a bug");
|
ERR_PRINT("low > high, this may be a bug");
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue