From 13c2ff932089db24841bb971b645141218bd8586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 6 Dec 2017 21:36:34 +0100 Subject: Style: Apply new clang-format 5.0 style to all files --- servers/visual/rasterizer.h | 4 ++-- servers/visual/visual_server_raster.h | 9 ++++----- servers/visual/visual_server_scene.cpp | 11 +++-------- servers/visual/visual_server_scene.h | 13 +++++++------ servers/visual/visual_server_wrap_mt.cpp | 4 ++-- servers/visual/visual_server_wrap_mt.h | 2 +- 6 files changed, 19 insertions(+), 24 deletions(-) (limited to 'servers/visual') diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 4bb34af241..0ee70878dc 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -116,8 +116,8 @@ public: virtual void base_changed() = 0; virtual void base_material_changed() = 0; - InstanceBase() - : dependency_item(this) { + InstanceBase() : + dependency_item(this) { base_type = VS::INSTANCE_NONE; cast_shadows = VS::SHADOW_CASTING_SETTING_ON; diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 91542625e0..9223d81e32 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -77,8 +77,8 @@ class VisualServerRaster : public VisualServer { static void _changes_changed() {} public: -//if editor is redrawing when it shouldn't, enable this and put a breakpoint in _changes_changed() -//#define DEBUG_CHANGES + //if editor is redrawing when it shouldn't, enable this and put a breakpoint in _changes_changed() + //#define DEBUG_CHANGES #ifdef DEBUG_CHANGES _FORCE_INLINE_ static void redraw_request() { @@ -96,7 +96,6 @@ public: #define DISPLAY_CHANGED \ changes++; #endif -// print_line(String("CHANGED: ") + __FUNCTION__); #define BIND0R(m_r, m_name) \ m_r m_name() { return BINDBASE->m_name(); } @@ -451,7 +450,7 @@ public: BIND2R(int, viewport_get_render_info, RID, ViewportRenderInfo) BIND2(viewport_set_debug_draw, RID, ViewportDebugDraw) -/* ENVIRONMENT API */ + /* ENVIRONMENT API */ #undef BINDBASE //from now on, calls forwarded to this singleton @@ -481,7 +480,7 @@ public: BIND6(environment_set_fog_depth, RID, bool, float, float, bool, float) BIND5(environment_set_fog_height, RID, bool, float, float, float) -/* SCENARIO API */ + /* SCENARIO API */ #undef BINDBASE #define BINDBASE VSG::scene diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 72fb1df94b..eef4720d22 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -1333,9 +1333,7 @@ void VisualServerScene::render_camera(RID p_camera, RID p_scenario, Size2 p_view p_viewport_size.width / (float)p_viewport_size.height, camera->znear, camera->zfar, - camera->vaspect - - ); + camera->vaspect); ortho = true; } break; case Camera::PERSPECTIVE: { @@ -1345,9 +1343,7 @@ void VisualServerScene::render_camera(RID p_camera, RID p_scenario, Size2 p_view p_viewport_size.width / (float)p_viewport_size.height, camera->znear, camera->zfar, - camera->vaspect - - ); + camera->vaspect); ortho = false; } break; @@ -2742,8 +2738,7 @@ void VisualServerScene::render_probes() { switch (probe->dynamic.updating_stage) { case GI_UPDATE_STAGE_CHECK: { - if (_check_gi_probe(instance_probe) || force_lighting) { -//send to lighting thread + if (_check_gi_probe(instance_probe) || force_lighting) { //send to lighting thread #ifndef NO_THREADS probe_bake_mutex->lock(); diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h index bc5d266113..9e4701de65 100644 --- a/servers/visual/visual_server_scene.h +++ b/servers/visual/visual_server_scene.h @@ -229,8 +229,9 @@ public: singleton->_instance_queue_update(this, false, true); } - Instance() - : scenario_item(this), update_item(this) { + Instance() : + scenario_item(this), + update_item(this) { octree_id = 0; scenario = NULL; @@ -305,8 +306,8 @@ public: int render_step; - InstanceReflectionProbeData() - : update_list(this) { + InstanceReflectionProbeData() : + update_list(this) { reflection_dirty = true; render_step = -1; @@ -434,8 +435,8 @@ public: SelfList update_element; - InstanceGIProbeData() - : update_element(this) { + InstanceGIProbeData() : + update_element(this) { invalid = true; base_version = 0; dynamic.updating_stage = GI_UPDATE_STAGE_CHECK; diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp index 03c68ab454..b86a0ae3f6 100644 --- a/servers/visual/visual_server_wrap_mt.cpp +++ b/servers/visual/visual_server_wrap_mt.cpp @@ -158,8 +158,8 @@ void VisualServerWrapMT::finish() { canvas_occluder_polygon_free_cached_ids(); } -VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_thread) - : command_queue(p_create_thread) { +VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_thread) : + command_queue(p_create_thread) { visual_server = p_contained; create_thread = p_create_thread; diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index 1c3b34d16f..b58b1d917e 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -62,7 +62,7 @@ class VisualServerWrapMT : public VisualServer { int pool_max_size; -//#define DEBUG_SYNC + //#define DEBUG_SYNC #ifdef DEBUG_SYNC #define SYNC_DEBUG print_line("sync on: " + String(__FUNCTION__)); -- cgit v1.2.3