From 33403d91f77f1f34b19bff763391500bc9c2616c Mon Sep 17 00:00:00 2001 From: Hubert Jarosz Date: Sat, 21 May 2016 15:29:25 +0200 Subject: [PATCH] remove trailing whitespace --- bin/tests/test_python.cpp | 2 +- core/bind/core_bind.cpp | 32 +++++++------- core/io/http_client.cpp | 2 +- core/ustring.cpp | 2 +- platform/android/globals/global_defaults.h | 2 +- platform/iphone/globals/global_defaults.h | 2 +- platform/javascript/dom_keys.h | 30 ++++++------- platform/windows/os_windows.h | 2 +- scene/animation/animation_player.cpp | 2 +- scene/main/http_request.cpp | 2 +- scene/main/viewport.cpp | 2 +- scene/resources/curve.cpp | 2 +- scene/resources/stb_truetype.h | 44 +++++++++---------- scene/resources/theme.cpp | 2 +- servers/visual/visual_server_raster.h | 2 +- tools/editor/editor_node.cpp | 6 +-- tools/editor/editor_node.h | 4 +- tools/editor/editor_settings.cpp | 2 +- .../editor/plugins/spatial_editor_plugin.cpp | 8 ++-- tools/editor/plugins/theme_editor_plugin.cpp | 2 +- tools/editor/plugins/tile_map_editor_plugin.h | 2 +- tools/editor/project_export.cpp | 2 +- tools/editor/register_exporters.h | 2 +- tools/editor/scene_tree_dock.cpp | 2 +- 24 files changed, 80 insertions(+), 80 deletions(-) diff --git a/bin/tests/test_python.cpp b/bin/tests/test_python.cpp index 26fb4bdafbc..f4a3d7a3a2a 100644 --- a/bin/tests/test_python.cpp +++ b/bin/tests/test_python.cpp @@ -53,4 +53,4 @@ void test() { } -#endif \ No newline at end of file +#endif diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 45d089599b7..e8703dccca1 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -500,9 +500,9 @@ void _OS::set_icon(const Image& p_icon) { } /** - * Get current datetime with consideration for utc and + * Get current datetime with consideration for utc and * dst - */ + */ Dictionary _OS::get_datetime(bool utc) const { Dictionary dated = get_date(utc); @@ -564,17 +564,17 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const { // Get all time values from the dictionary, set to zero if it doesn't exist. // Risk incorrect calculation over throwing errors - unsigned int second = ((datetime.has(SECOND_KEY))? + unsigned int second = ((datetime.has(SECOND_KEY))? static_cast(datetime[SECOND_KEY]): 0); - unsigned int minute = ((datetime.has(MINUTE_KEY))? + unsigned int minute = ((datetime.has(MINUTE_KEY))? static_cast(datetime[MINUTE_KEY]): 0); - unsigned int hour = ((datetime.has(HOUR_KEY))? + unsigned int hour = ((datetime.has(HOUR_KEY))? static_cast(datetime[HOUR_KEY]): 0); - unsigned int day = ((datetime.has(DAY_KEY))? + unsigned int day = ((datetime.has(DAY_KEY))? static_cast(datetime[DAY_KEY]): 0); - unsigned int month = ((datetime.has(MONTH_KEY))? + unsigned int month = ((datetime.has(MONTH_KEY))? static_cast(datetime[MONTH_KEY]) -1: 0); - unsigned int year = ((datetime.has(YEAR_KEY))? + unsigned int year = ((datetime.has(YEAR_KEY))? static_cast(datetime[YEAR_KEY]):0); /// How many days come before each month (0-12) @@ -604,7 +604,7 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const { ERR_FAIL_COND_V( day > MONTH_DAYS_TABLE[LEAPYEAR(year)][month], 0); // Calculate all the seconds from months past in this year - uint64_t SECONDS_FROM_MONTHS_PAST_THIS_YEAR = + uint64_t SECONDS_FROM_MONTHS_PAST_THIS_YEAR = DAYS_PAST_THIS_YEAR_TABLE[LEAPYEAR(year)][month] * SECONDS_PER_DAY; uint64_t SECONDS_FROM_YEARS_PAST = 0; @@ -614,13 +614,13 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const { SECONDS_PER_DAY; } - uint64_t epoch = - second + - minute * SECONDS_PER_MINUTE + + uint64_t epoch = + second + + minute * SECONDS_PER_MINUTE + hour * SECONDS_PER_HOUR + // Subtract 1 from day, since the current day isn't over yet // and we cannot count all 24 hours. - (day-1) * SECONDS_PER_DAY + + (day-1) * SECONDS_PER_DAY + SECONDS_FROM_MONTHS_PAST_THIS_YEAR + SECONDS_FROM_YEARS_PAST; return epoch; @@ -631,7 +631,7 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const { * Get a dictionary of time values when given epoch time * * Dictionary Time values will be a union if values from #get_time - * and #get_date dictionaries (with the exception of dst = + * and #get_date dictionaries (with the exception of dst = * day light standard time, as it cannot be determined from epoch) * * @param unix_time_val epoch time to convert @@ -660,14 +660,14 @@ Dictionary _OS::get_datetime_from_unix_time( uint64_t unix_time_val) const { time.hour = dayclock / 3600; /* day 0 was a thursday */ - date.weekday = static_cast((dayno + 4) % 7); + date.weekday = static_cast((dayno + 4) % 7); while (dayno >= YEARSIZE(year)) { dayno -= YEARSIZE(year); year++; } - date.year = year; + date.year = year; size_t imonth = 0; diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index 680e0ef7f93..11f9536243a 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -116,7 +116,7 @@ Error HTTPClient::request_raw( Method p_method, const String& p_url, const Vecto } request+="\r\n"; CharString cs=request.utf8(); - + DVector data; //Maybe this goes faster somehow? diff --git a/core/ustring.cpp b/core/ustring.cpp index c2520a7a86d..a039ba11cda 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3635,7 +3635,7 @@ String String::percent_decode() const { CharString cs = utf8(); for(int i=0;ianimation_started, c.assigned); if (is_inside_tree() && get_tree()->is_editor_hint()) diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 90e37137994..328ad8fb26a 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -494,7 +494,7 @@ HTTPRequest::HTTPRequest() max_redirects=8; body_len=-1; got_response=false; - validate_ssl=false; + validate_ssl=false; use_ssl=false; response_code=0; request_sent=false; diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index ebc8d49422b..5ce53194a1e 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1841,7 +1841,7 @@ void Viewport::_gui_input_event(InputEvent p_event) { if (gui.mouse_over) gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_EXIT); - + _gui_cancel_tooltip(); if (over) diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index 516156c3150..88ff09e961f 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -544,7 +544,7 @@ void Curve2D::_bake() const { List pointlist; pointlist.push_back(pos); //start always from origin - + for(int i=0;ix1 - e->x0) / (e->y1 - e->y0); STBTT_assert(z != NULL); if (!z) return z; - + // round dx down to avoid overshooting if (dxdy < 0) z->dx = -STBTT_ifloor(STBTT_FIX * -dxdy); @@ -1769,7 +1769,7 @@ static void stbtt__fill_active_edges(unsigned char *scanline, int len, stbtt__ac } } } - + e = e->next; } } @@ -2441,7 +2441,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info { int ix0,iy0,ix1,iy1; stbtt__bitmap gbm; - stbtt_vertex *vertices; + stbtt_vertex *vertices; int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices); if (scale_x == 0) scale_x = scale_y; @@ -2464,7 +2464,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info if (height) *height = gbm.h; if (xoff ) *xoff = ix0; if (yoff ) *yoff = iy0; - + if (gbm.w && gbm.h) { gbm.pixels = (unsigned char *) STBTT_malloc(gbm.w * gbm.h, info->userdata); if (gbm.pixels) { @@ -2475,7 +2475,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info } STBTT_free(vertices, info->userdata); return gbm.pixels; -} +} STBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff) { @@ -2487,7 +2487,7 @@ STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigne int ix0,iy0; stbtt_vertex *vertices; int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices); - stbtt__bitmap gbm; + stbtt__bitmap gbm; stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,0,0); gbm.pixels = output; @@ -2509,7 +2509,7 @@ STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char * STBTT_DEF unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff) { return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y,shift_x,shift_y, stbtt_FindGlyphIndex(info,codepoint), width,height,xoff,yoff); -} +} STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint) { @@ -2519,7 +2519,7 @@ STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, uns STBTT_DEF unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff) { return stbtt_GetCodepointBitmapSubpixel(info, scale_x, scale_y, 0.0f,0.0f, codepoint, width,height,xoff,yoff); -} +} STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint) { @@ -2644,7 +2644,7 @@ static void stbrp_init_target(stbrp_context *con, int pw, int ph, stbrp_node *no con->y = 0; con->bottom_y = 0; STBTT__NOTUSED(nodes); - STBTT__NOTUSED(num_nodes); + STBTT__NOTUSED(num_nodes); } static void stbrp_pack_rects(stbrp_context *con, stbrp_rect *rects, int num_rects) @@ -2996,7 +2996,7 @@ STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, unsigned char *fontd n = 0; for (i=0; i < num_ranges; ++i) n += ranges[i].num_chars; - + rects = (stbrp_rect *) STBTT_malloc(sizeof(*rects) * n, spc->user_allocator_context); if (rects == NULL) return 0; @@ -3007,7 +3007,7 @@ STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, unsigned char *fontd n = stbtt_PackFontRangesGatherRects(spc, &info, ranges, num_ranges, rects); stbtt_PackFontRangesPackRects(spc, rects, n); - + return_value = stbtt_PackFontRangesRenderIntoRects(spc, &info, ranges, num_ranges, rects); STBTT_free(rects, spc->user_allocator_context); @@ -3060,7 +3060,7 @@ STBTT_DEF void stbtt_GetPackedQuad(stbtt_packedchar *chardata, int pw, int ph, i // // check if a utf8 string contains a prefix which is the utf16 string; if so return length of matching utf8 string -static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(const stbtt_uint8 *s1, stbtt_int32 len1, const stbtt_uint8 *s2, stbtt_int32 len2) +static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(const stbtt_uint8 *s1, stbtt_int32 len1, const stbtt_uint8 *s2, stbtt_int32 len2) { stbtt_int32 i=0; @@ -3099,7 +3099,7 @@ static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(const stbtt_uint8 return i; } -STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2) +STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2) { return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((const stbtt_uint8*) s1, len1, (const stbtt_uint8*) s2, len2); } diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 20405a57b2c..8d0aedbf93c 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -374,7 +374,7 @@ void Theme::get_stylebox_types(List *p_list) const { const StringName *key=NULL; while((key=style_map.next(key))) { p_list->push_back(*key); - } + } } void Theme::set_font(const StringName& p_name,const StringName& p_type,const Ref& p_font) { diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index cb9e96e284a..5abad863ee7 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -657,7 +657,7 @@ public: virtual RID texture_create(); virtual void texture_allocate(RID p_texture,int p_width, int p_height,Image::Format p_format,uint32_t p_flags=TEXTURE_FLAGS_DEFAULT); - virtual void texture_set_data(RID p_texture,const Image& p_image,CubeMapSide p_cube_side=CUBEMAP_LEFT); + virtual void texture_set_data(RID p_texture,const Image& p_image,CubeMapSide p_cube_side=CUBEMAP_LEFT); virtual Image texture_get_data(RID p_texture,CubeMapSide p_cube_side=CUBEMAP_LEFT) const; virtual void texture_set_flags(RID p_texture,uint32_t p_flags) ; virtual uint32_t texture_get_flags(RID p_texture) const; diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 7cff6dab9c6..f638f177ecf 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -1712,7 +1712,7 @@ void EditorNode::_edit_current() { _set_top_editors(sub_plugins); _set_editing_top_editors(current_obj); _display_top_editors(true); - + } else if (!editor_plugins_over->get_plugins_list().empty()) { _hide_top_editors(); @@ -6400,7 +6400,7 @@ EditorNode::EditorNode() { EditorNode::~EditorNode() { - + memdelete( EditorHelp::get_doc_data() ); memdelete(editor_selection); memdelete(editor_plugins_over); @@ -6466,6 +6466,6 @@ EditorPluginList::EditorPluginList() { EditorPluginList::~EditorPluginList() { } - + diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 8fa6cfefcf7..72bf8c624c5 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -451,7 +451,7 @@ private: void _display_top_editors(bool p_display); void _set_top_editors(Vector p_editor_plugins_over); void _set_editing_top_editors(Object * p_current_object); - + void _quick_opened(); void _quick_run(); @@ -746,7 +746,7 @@ public: EditorPluginList(); ~EditorPluginList(); -} ; +} ; struct EditorProgressBG { diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index a83125d0bb9..91d7e7ebd48 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -464,7 +464,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { set("2d_editor/bone_color2",Color(0.75,0.75,0.75,0.9)); set("2d_editor/bone_selected_color",Color(0.9,0.45,0.45,0.9)); set("2d_editor/bone_ik_color",Color(0.9,0.9,0.45,0.9)); - + set("2d_editor/keep_margins_when_changing_anchors", false); set("game_window_placement/rect",0); diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 30296100d0e..fa99a3d335c 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -1229,7 +1229,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { case InputEvent::MOUSE_MOTION: { const InputEventMouseMotion &m=p_event.mouse_motion; _edit.mouse_pos=Point2(p_event.mouse_motion.x,p_event.mouse_motion.y); - + if (spatial_editor->get_selected()) { @@ -1265,7 +1265,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { NavigationScheme nav_scheme = _get_navigation_schema("3d_editor/navigation_scheme"); NavigationMode nav_mode = NAVIGATION_NONE; - + if (_edit.gizmo.is_valid()) { Plane plane=Plane(_edit.gizmo_initial_pos,_get_camera_normal()); @@ -1591,7 +1591,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { mod=KEY_CONTROL; if (m.mod.meta) mod=KEY_META; - + if(mod){ if (mod == _get_key_modifier("3d_editor/pan_modifier")) nav_mode = NAVIGATION_PAN; @@ -1815,7 +1815,7 @@ void SpatialEditorViewport::_notification(int p_what) { if (visible) _update_camera(); - + call_deferred("update_transform_gizmo_view"); } diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp index 5321a7b6d8d..37cb0398e7e 100644 --- a/tools/editor/plugins/theme_editor_plugin.cpp +++ b/tools/editor/plugins/theme_editor_plugin.cpp @@ -398,7 +398,7 @@ void ThemeEditor::_dialog_cbk() { } - } break; + } break; case POPUP_CLASS_REMOVE: { StringName fromtype = type_edit->get_text(); List names; diff --git a/tools/editor/plugins/tile_map_editor_plugin.h b/tools/editor/plugins/tile_map_editor_plugin.h index b1da1bc48e6..92b54a4cbbe 100644 --- a/tools/editor/plugins/tile_map_editor_plugin.h +++ b/tools/editor/plugins/tile_map_editor_plugin.h @@ -130,7 +130,7 @@ class TileMapEditor : public VBoxContainer { void _fill_points(const DVector p_points, const Dictionary& p_op); void _erase_points(const DVector p_points); - + void _select(const Point2i& p_from, const Point2i& p_to); void _draw_cell(int p_cell, const Point2i& p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Matrix32& p_xform); diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index ee9eee15901..dea15ebd350 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -470,7 +470,7 @@ void ProjectExportDialog::_export_action(const String& p_file) { /* Checked if the export location is outside the project directory, * now will check if a file name has been entered */ if (p_file.ends_with("/")) { - + error->set_text("Please enter a file name!"); error->popup_centered_minsize(); return; diff --git a/tools/editor/register_exporters.h b/tools/editor/register_exporters.h index 364ad5efc94..dccaa0641f1 100644 --- a/tools/editor/register_exporters.h +++ b/tools/editor/register_exporters.h @@ -32,4 +32,4 @@ void register_exporters(); -#endif \ No newline at end of file +#endif diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index 0da233deca8..7c64ed60b1c 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -1241,7 +1241,7 @@ void SceneTreeDock::_selection_changed() { //automatically turn on multi-edit _tool_selected(TOOL_MULTI_EDIT); } - + //tool_buttons[TOOL_MULTI_EDIT]->set_disabled(EditorNode::get_singleton()->get_editor_selection()->get_selection().size()<2); }