From bb13fa896e78c89acdeac647873d854115dccd57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 18 Jul 2018 17:56:12 +0200 Subject: [PATCH] Style: Format code with clang-format 6.0.1 --- core/math/face3.h | 2 -- core/os/input.h | 2 +- core/register_core_types.cpp | 2 +- core/typedefs.h | 6 +++--- drivers/gles2/shader_compiler_gles2.cpp | 3 ++- drivers/wasapi/audio_driver_wasapi.cpp | 15 +++++++++++---- editor/io_plugins/editor_import_collada.cpp | 6 +++--- main/input_default.cpp | 2 +- modules/gdscript/gd_compiler.cpp | 2 +- modules/gdscript/gd_parser.cpp | 3 ++- modules/gdscript/gd_tokenizer.cpp | 2 +- modules/pvr/texture_loader_pvr.cpp | 6 +++--- modules/theora/video_stream_theora.cpp | 2 +- modules/vorbis/audio_stream_ogg_vorbis.cpp | 4 ++-- platform/android/audio_driver_opensl.h | 3 ++- .../src/org/godotengine/godot/Dictionary.java | 1 - .../java/src/org/godotengine/godot/Godot.java | 12 ++++++------ .../java/src/org/godotengine/godot/GodotIO.java | 2 -- .../godotengine/godot/payments/ConsumeTask.java | 2 -- .../godot/payments/PaymentsManager.java | 8 ++------ .../godot/payments/ReleaseAllConsumablesTask.java | 1 - .../godotengine/godot/payments/ValidateTask.java | 2 -- platform/bb10/os_bb10.cpp | 2 +- platform/haiku/os_haiku.cpp | 2 +- platform/haiku/os_haiku.h | 2 +- platform/iphone/game_center.mm | 3 --- platform/iphone/os_iphone.cpp | 2 +- platform/javascript/os_javascript.cpp | 1 - platform/osx/os_osx.h | 2 +- platform/osx/os_osx.mm | 2 +- platform/windows/godot_win.cpp | 4 ++-- platform/windows/os_windows.cpp | 5 +++-- platform/winrt/os_winrt.cpp | 3 +-- scene/3d/sprite_3d.cpp | 2 +- scene/main/node.cpp | 2 +- servers/physics/gjk_epa.cpp | 2 +- 36 files changed, 57 insertions(+), 65 deletions(-) mode change 100755 => 100644 scene/main/node.cpp diff --git a/core/math/face3.h b/core/math/face3.h index 11c6e71499..80260d332d 100644 --- a/core/math/face3.h +++ b/core/math/face3.h @@ -256,6 +256,4 @@ bool Face3::intersects_aabb2(const AABB &p_aabb) const { return true; } - //this sucks... - #endif // FACE3_H diff --git a/core/os/input.h b/core/os/input.h index f7162b9fb0..a97892f6f4 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -50,7 +50,7 @@ public: MOUSE_MODE_CAPTURED }; - #undef CursorShape +#undef CursorShape enum CursorShape { CURSOR_ARROW, CURSOR_IBEAM, diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index b19ec82714..1953fc6ce6 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -30,9 +30,9 @@ #include "register_core_types.h" #include "bind/core_bind.h" +#include "color.h" #include "compressed_translation.h" #include "core/io/xml_parser.h" -#include "color.h" #include "core_string_names.h" #include "func_ref.h" #include "geometry.h" diff --git a/core/typedefs.h b/core/typedefs.h index 8bb7ef04ae..28691c8a5b 100644 --- a/core/typedefs.h +++ b/core/typedefs.h @@ -77,7 +77,7 @@ T *_nullptr() { #define OFFSET_OF(st, m) \ ((size_t)((char *)&(_nullptr()->m) - (char *)0)) - /** +/** * Some platforms (devices) not define NULL */ @@ -85,7 +85,7 @@ T *_nullptr() { #define NULL 0 #endif - /** +/** * Windows defines a lot of badly stuff we'll never ever use. undefine it. */ @@ -107,7 +107,7 @@ T *_nullptr() { #include "int_types.h" - /** Generic ABS function, for math uses please use Math::abs */ +/** Generic ABS function, for math uses please use Math::abs */ #ifndef ABS #define ABS(m_v) ((m_v < 0) ? (-(m_v)) : (m_v)) diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index 1c5562688b..f3e3679122 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -418,7 +418,8 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node, int p_level, bool p code+="vec4( "+dump_node_code(onode->arguments[i],p_level)+(i==4?",1.0)":",0.0)"); } - } else*/ if (callfunc == "tex") { + } else*/ + if (callfunc == "tex") { code = "texture2D( " + dump_node_code(onode->arguments[1], p_level) + "," + dump_node_code(onode->arguments[2], p_level) + ")"; break; diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index c725bc733c..db74c36aad 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -46,8 +46,15 @@ class CMMNotificationClient : public IMMNotificationClient { IMMDeviceEnumerator *_pEnumerator; public: - CMMNotificationClient() : _cRef(1), _pEnumerator(NULL) { } - ~CMMNotificationClient() { if ((_pEnumerator) != NULL) { (_pEnumerator)->Release(); (_pEnumerator) = NULL; } } + CMMNotificationClient() : + _cRef(1), + _pEnumerator(NULL) {} + ~CMMNotificationClient() { + if ((_pEnumerator) != NULL) { + (_pEnumerator)->Release(); + (_pEnumerator) = NULL; + } + } ULONG STDMETHODCALLTYPE AddRef() { return InterlockedIncrement(&_cRef); @@ -64,10 +71,10 @@ public: HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, VOID **ppvInterface) { if (IID_IUnknown == riid) { AddRef(); - *ppvInterface = (IUnknown*)this; + *ppvInterface = (IUnknown *)this; } else if (__uuidof(IMMNotificationClient) == riid) { AddRef(); - *ppvInterface = (IMMNotificationClient*)this; + *ppvInterface = (IMMNotificationClient *)this; } else { *ppvInterface = NULL; return E_NOINTERFACE; diff --git a/editor/io_plugins/editor_import_collada.cpp b/editor/io_plugins/editor_import_collada.cpp index 41c3706b5a..f408b29cbe 100644 --- a/editor/io_plugins/editor_import_collada.cpp +++ b/editor/io_plugins/editor_import_collada.cpp @@ -2167,9 +2167,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones } } - /*********************************************************************************/ - /*************************************** SCENE ***********************************/ - /*********************************************************************************/ +/*********************************************************************************/ +/*************************************** SCENE ***********************************/ +/*********************************************************************************/ #define DEBUG_ANIMATION diff --git a/main/input_default.cpp b/main/input_default.cpp index bd61261f88..c8693125b9 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -500,7 +500,7 @@ void InputDefault::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_sh custom_cursors[p_shape] = p_cursor; - OS::get_singleton()->set_custom_mouse_cursor(p_cursor, (OS::CursorShape) p_shape, p_hotspot); + OS::get_singleton()->set_custom_mouse_cursor(p_cursor, (OS::CursorShape)p_shape, p_hotspot); } // from github.com/gabomdq/SDL_GameControllerDB diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index f4cfd96f00..d2aa33bab4 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -771,7 +771,7 @@ int GDCompiler::_parse_expression(CodeGen &codegen, const GDParser::Node *p_expr ERR_FAIL_COND_V(on->arguments.size() != 2, -1); if (on->arguments[0]->type == GDParser::Node::TYPE_OPERATOR && (static_cast(on->arguments[0])->op == GDParser::OperatorNode::OP_INDEX || static_cast(on->arguments[0])->op == GDParser::OperatorNode::OP_INDEX_NAMED)) { - //SET (chained) MODE!! + //SET (chained) MODE!! #ifdef DEBUG_ENABLED if (static_cast(on->arguments[0])->op == GDParser::OperatorNode::OP_INDEX_NAMED) { diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index ee365bd804..a25f9f35d6 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -3022,7 +3022,8 @@ void GDParser::_parse_class(ClassNode *p_class) { member._export.type=Variant::DICTIONARY; - } else*/ { + } else*/ + { if (subexpr->type != Node::TYPE_CONSTANT) { diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp index af909d98bb..5fb14709a0 100644 --- a/modules/gdscript/gd_tokenizer.cpp +++ b/modules/gdscript/gd_tokenizer.cpp @@ -1026,7 +1026,7 @@ void GDTokenizerText::advance(int p_amount) { _advance(); } - ////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////// #define BYTECODE_VERSION 10 diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index b8d34d20eb..6fb9257f86 100644 --- a/modules/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp @@ -241,11 +241,11 @@ ResourceFormatPVR::ResourceFormatPVR() { Image::_image_compress_pvrtc2_func = _compress_pvrtc4; } - ///////////////////////////////////////////////////////// +///////////////////////////////////////////////////////// - //PVRTC decompressor, Based on PVRTC decompressor by IMGTEC. +//PVRTC decompressor, Based on PVRTC decompressor by IMGTEC. - ///////////////////////////////////////////////////////// +///////////////////////////////////////////////////////// #define PT_INDEX 2 #define BLK_Y_SIZE 4 diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 5c178a2d37..aa77b86fe4 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -661,7 +661,7 @@ void VideoStreamPlaybackTheora::update(float p_delta) { } } - //print_line("no theora: "+itos(no_theora)+" theora eos: "+itos(theora_eos)+" frame done "+itos(frame_done)); + //print_line("no theora: "+itos(no_theora)+" theora eos: "+itos(theora_eos)+" frame done "+itos(frame_done)); #ifdef THEORA_USE_THREAD_STREAMING if (file && thread_eof && no_theora && theora_eos && ring_buffer.data_left() == 0) { diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 539217e109..c8776fcfc4 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -47,7 +47,7 @@ size_t AudioStreamPlaybackOGGVorbis::_ov_read_func(void *p_dst, size_t p_data, s int AudioStreamPlaybackOGGVorbis::_ov_seek_func(void *_f, ogg_int64_t offs, int whence) { -//printf("seek to %p, offs %i, whence %i\n",_f,(int)offs,whence); + //printf("seek to %p, offs %i, whence %i\n",_f,(int)offs,whence); #ifdef SEEK_SET //printf("seek set defined\n"); @@ -106,7 +106,7 @@ int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) { break; } - //printf("to mix %i - mix me %i bytes\n",to_mix,to_mix*stream_channels*sizeof(int16_t)); + //printf("to mix %i - mix me %i bytes\n",to_mix,to_mix*stream_channels*sizeof(int16_t)); #ifdef BIG_ENDIAN_ENABLED long ret = ov_read(&vf, (char *)p_bufer, todo * stream_channels * sizeof(int16_t), 1, 2, 1, ¤t_section); diff --git a/platform/android/audio_driver_opensl.h b/platform/android/audio_driver_opensl.h index f46e76cd8f..c44825ad48 100644 --- a/platform/android/audio_driver_opensl.h +++ b/platform/android/audio_driver_opensl.h @@ -72,7 +72,8 @@ class AudioDriverOpenSL : public AudioDriverSW { /* SLuint32 eventFlags, const void * pBuffer, SLuint32 bufferSize, - SLuint32 dataUsed*/); + SLuint32 dataUsed*/ + ); static void _buffer_callbacks( SLAndroidSimpleBufferQueueItf queueItf, diff --git a/platform/android/java/src/org/godotengine/godot/Dictionary.java b/platform/android/java/src/org/godotengine/godot/Dictionary.java index ae54c225ec..b7ced69d0e 100644 --- a/platform/android/java/src/org/godotengine/godot/Dictionary.java +++ b/platform/android/java/src/org/godotengine/godot/Dictionary.java @@ -78,4 +78,3 @@ public class Dictionary extends HashMap { keys_cache = null; }; }; - diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java index bd5be3f3f3..360e93224f 100644 --- a/platform/android/java/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/src/org/godotengine/godot/Godot.java @@ -410,7 +410,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC _self = this; Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); - mClipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); + mClipboard = (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE); if (true) { boolean md5mismatch = false; @@ -583,8 +583,8 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC String copiedText = ""; if (mClipboard.getPrimaryClip() != null) { - ClipData.Item item = mClipboard.getPrimaryClip().getItemAt(0); - copiedText = item.getText().toString(); + ClipData.Item item = mClipboard.getPrimaryClip().getItemAt(0); + copiedText = item.getText().toString(); } return copiedText; @@ -646,10 +646,10 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC float[] adjustedValues = new float[3]; final int axisSwap[][] = { - { 1, -1, 0, 1 }, // ROTATION_0 + { 1, -1, 0, 1 }, // ROTATION_0 { -1, -1, 1, 0 }, // ROTATION_90 - { -1, 1, 0, 1 }, // ROTATION_180 - { 1, 1, 1, 0 } // ROTATION_270 + { -1, 1, 0, 1 }, // ROTATION_180 + { 1, 1, 1, 0 } // ROTATION_270 }; final int[] as = axisSwap[displayRotation]; diff --git a/platform/android/java/src/org/godotengine/godot/GodotIO.java b/platform/android/java/src/org/godotengine/godot/GodotIO.java index ce057f4005..47c2be45af 100644 --- a/platform/android/java/src/org/godotengine/godot/GodotIO.java +++ b/platform/android/java/src/org/godotengine/godot/GodotIO.java @@ -436,7 +436,6 @@ public class GodotIO { Log.v(TAG, "Problem stopping audio thread: " + e); } mAudioThread = null; - } if (mAudioTrack != null) { @@ -515,7 +514,6 @@ public class GodotIO { public void showKeyboard(String p_existing_text) { if (edit != null) edit.showKeyboard(p_existing_text); - }; public void hideKeyboard() { diff --git a/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java b/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java index fecca360f8..bcd1301e26 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java @@ -61,7 +61,6 @@ abstract public class ConsumeTask { } final String token = _token; new AsyncTask() { - @Override protected String doInBackground(String... params) { try { @@ -83,7 +82,6 @@ abstract public class ConsumeTask { error(param); } } - } .execute(); } diff --git a/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java b/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java index f24dbc1d1f..996775bbfd 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java +++ b/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java @@ -308,14 +308,12 @@ public class PaymentsManager { public void processPurchaseResponse(int resultCode, Intent data) { HandlePurchaseTask handlePurchaseTask = new HandlePurchaseTask(activity) { - @Override protected void success(final String sku, final String signature, final String ticket) { godotPaymentV3.callbackSuccess(ticket, signature, sku); if (auto_consume) { new ConsumeTask(mService, activity) { - @Override protected void success(String ticket) { } @@ -346,12 +344,10 @@ public class PaymentsManager { public void validatePurchase(String purchaseToken, final String sku) { new ValidateTask(activity, godotPaymentV3) { - @Override protected void success() { new ConsumeTask(mService, activity) { - @Override protected void success(String ticket) { godotPaymentV3.callbackSuccess(ticket, null, sku); @@ -384,7 +380,6 @@ public class PaymentsManager { public void consume(final String sku) { new ConsumeTask(mService, activity) { - @Override protected void success(String ticket) { godotPaymentV3.callbackSuccessProductMassConsumed(ticket, "", sku); @@ -527,7 +522,8 @@ public class PaymentsManager { } godotPaymentV3.completeSkuDetail(); } - })).start(); + })) + .start(); } public void setBaseSingleton(GodotPaymentV3 godotPaymentV3) { diff --git a/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java b/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java index 2a20629f51..9d12ed6d06 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java @@ -84,7 +84,6 @@ abstract public class ReleaseAllConsumablesTask { String token = inappPurchaseData.getString("purchaseToken"); String signature = mySignatures.get(i); new GenericConsumeTask(context, mService, sku, receipt, signature, token) { - @Override public void onSuccess(String sku, String receipt, String signature, String token) { ReleaseAllConsumablesTask.this.success(sku, receipt, signature, token); diff --git a/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java b/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java index 1d8da3773a..43aeb23129 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java @@ -62,7 +62,6 @@ abstract public class ValidateTask { public void validatePurchase(final String sku) { new AsyncTask() { - private ProgressDialog dialog; @Override @@ -107,7 +106,6 @@ abstract public class ValidateTask { error(e.getMessage()); } } - } .execute(); } diff --git a/platform/bb10/os_bb10.cpp b/platform/bb10/os_bb10.cpp index 560c2dbc5e..232d9f8889 100644 --- a/platform/bb10/os_bb10.cpp +++ b/platform/bb10/os_bb10.cpp @@ -284,7 +284,7 @@ void OSBB10::set_cursor_shape(CursorShape p_shape) { //android really really really has no mouse.. how amazing.. } -void OSBB10::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void OSBB10::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { // Since BlackBerry 10 has no mouse, we do not need to change its texture (how amazing !) } diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index e9017b2b00..b29ee594c3 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -235,7 +235,7 @@ void OS_Haiku::set_cursor_shape(CursorShape p_shape) { //ERR_PRINT("set_cursor_shape() NOT IMPLEMENTED"); } -void OS_Haiku::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void OS_Haiku::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { // TODO: implement set_custom_mouse_cursor() } diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index 0e2f8635ad..79e04a352f 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -99,7 +99,7 @@ public: virtual int get_mouse_button_state() const; virtual void set_cursor_shape(CursorShape p_shape); virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot); - + virtual int get_screen_count() const; virtual int get_current_screen() const; virtual void set_current_screen(int p_screen); diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm index 5d15799964..a5101af187 100644 --- a/platform/iphone/game_center.mm +++ b/platform/iphone/game_center.mm @@ -153,7 +153,6 @@ Error GameCenter::award_achievement(Variant p_params) { [GKAchievement reportAchievements:@[ achievement ] withCompletionHandler:^(NSError *error) { - Dictionary ret; ret["type"] = "award_achievement"; if (error == nil) { @@ -172,7 +171,6 @@ Error GameCenter::award_achievement(Variant p_params) { void GameCenter::request_achievement_descriptions() { [GKAchievementDescription loadAchievementDescriptionsWithCompletionHandler:^(NSArray *descriptions, NSError *error) { - Dictionary ret; ret["type"] = "achievement_descriptions"; if (error == nil) { @@ -228,7 +226,6 @@ void GameCenter::request_achievement_descriptions() { void GameCenter::request_achievements() { [GKAchievement loadAchievementsWithCompletionHandler:^(NSArray *achievements, NSError *error) { - Dictionary ret; ret["type"] = "achievements"; if (error == nil) { diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp index 81c8b87a9e..16d9ee7530 100644 --- a/platform/iphone/os_iphone.cpp +++ b/platform/iphone/os_iphone.cpp @@ -478,7 +478,7 @@ void OSIPhone::set_cursor_shape(CursorShape p_shape){ }; -void OSIPhone::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void OSIPhone::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot){ }; diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 0c092f4f0b..0d4637cf2d 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -686,7 +686,6 @@ void OS_JavaScript::set_cursor_shape(CursorShape p_shape) { } void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { - } void OS_JavaScript::main_loop_begin() { diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 3e2c802a6d..0c1f72ef28 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -48,8 +48,8 @@ #include "servers/visual/rasterizer.h" #include "servers/visual/visual_server_wrap_mt.h" #include "servers/visual_server.h" -#include #include +#include //bitch #undef CursorShape diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index b60cf74094..8993cb7b99 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1259,7 +1259,7 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c uint8_t alpha = (color >> 24) & 0xFF; pixels[i * 4 + 0] = ((color >> 16) & 0xFF) * alpha / 255; pixels[i * 4 + 1] = ((color >> 8) & 0xFF) * alpha / 255; - pixels[i * 4 + 2] = ((color) & 0xFF) * alpha / 255; + pixels[i * 4 + 2] = ((color)&0xFF) * alpha / 255; pixels[i * 4 + 3] = alpha; } diff --git a/platform/windows/godot_win.cpp b/platform/windows/godot_win.cpp index 20e351c47c..743deab482 100644 --- a/platform/windows/godot_win.cpp +++ b/platform/windows/godot_win.cpp @@ -175,8 +175,8 @@ int _main() { } int main(int _argc, char **_argv) { -// _argc and _argv are ignored -// we are going to use the WideChar version of them instead + // _argc and _argv are ignored + // we are going to use the WideChar version of them instead #ifdef CRASH_HANDLER_EXCEPTION __try { diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 178f603114..a02cef0e39 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -39,10 +39,10 @@ #include "os/memory_pool_dynamic_static.h" #include "os_windows.h" +#include "scene/resources/texture.h" #include "servers/audio/audio_server_sw.h" #include "servers/visual/visual_server_raster.h" #include "servers/visual/visual_server_wrap_mt.h" -#include "scene/resources/texture.h" #include "globals.h" #include "io/marshalls.h" @@ -466,7 +466,8 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_MBUTTONDBLCLK: case WM_RBUTTONDBLCLK: /*case WM_XBUTTONDOWN: - case WM_XBUTTONUP: */ { + case WM_XBUTTONUP: */ + { /* LPARAM extra = GetMessageExtraInfo(); diff --git a/platform/winrt/os_winrt.cpp b/platform/winrt/os_winrt.cpp index c05b44e9cf..26e3992c77 100644 --- a/platform/winrt/os_winrt.cpp +++ b/platform/winrt/os_winrt.cpp @@ -488,7 +488,6 @@ void OSWinrt::ManagedType::update_clipboard() { if (data->Contains(StandardDataFormats::Text)) { create_task(data->GetTextAsync()).then([this](Platform::String ^ clipboard_content) { - this->clipboard = clipboard_content; }); } @@ -771,7 +770,7 @@ void OSWinrt::set_cursor_shape(CursorShape p_shape) { cursor_shape = p_shape; } -void OSWinrt::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void OSWinrt::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { // FIXME: // Not implemented, some work needs to be done for this one diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 8f5bcc170e..04d778f097 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -598,7 +598,7 @@ Sprite3D::Sprite3D() { hframes = 1; } - //////////////////////////////////////// +//////////////////////////////////////// #if 0 diff --git a/scene/main/node.cpp b/scene/main/node.cpp old mode 100755 new mode 100644 index 82b7bd55dc..4464dc182f --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -201,7 +201,7 @@ void Node::_propagate_enter_tree() { void Node::_propagate_exit_tree() { -//block while removing children + //block while removing children #ifdef DEBUG_ENABLED diff --git a/servers/physics/gjk_epa.cpp b/servers/physics/gjk_epa.cpp index 470b595c0e..240915b5e3 100644 --- a/servers/physics/gjk_epa.cpp +++ b/servers/physics/gjk_epa.cpp @@ -825,7 +825,7 @@ bool Penetration(const ShapeSW *shape0, return (false); } - /* Symbols cleanup */ +/* Symbols cleanup */ #undef GJK_MAX_ITERATIONS #undef GJK_ACCURARY