diff options
author | Hans Goudey <h.goudey@me.com> | 2022-10-05 21:44:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-10-05 21:48:01 +0300 |
commit | 548a2cbe06b23d90b0e09da49fc854178c270b8a (patch) | |
tree | 8706b5be97ace0ff0ca18d4109586ccb5cf0a666 /source/blender/editors/space_view3d | |
parent | 6306d747b770685f38f95bc57f8681335ddfa506 (diff) |
Cleanup: Clang tidy
Also remove unnecessary struct keywords in C++ files.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.cc | 14 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.cc | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.cc b/source/blender/editors/space_view3d/space_view3d.cc index 672922ac3e5..4ac6f926818 100644 --- a/source/blender/editors/space_view3d/space_view3d.cc +++ b/source/blender/editors/space_view3d/space_view3d.cc @@ -8,8 +8,8 @@ /* Allow using deprecated functionality for .blend file I/O. */ #define DNA_DEPRECATED_ALLOW -#include <stdio.h> -#include <string.h> +#include <cstdio> +#include <cstring> #include "DNA_collection_types.h" #include "DNA_defaults.h" @@ -881,7 +881,7 @@ static void view3d_lightcache_update(bContext *C) } /* region dropbox definition */ -static void view3d_dropboxes(void) +static void view3d_dropboxes() { ListBase *lb = WM_dropboxmap_find("View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW); @@ -959,7 +959,7 @@ static void view3d_dropboxes(void) nullptr); } -static void view3d_widgets(void) +static void view3d_widgets() { wmGizmoMapType_Params params{SPACE_VIEW3D, RGN_TYPE_WINDOW}; wmGizmoMapType *gzmap_type = WM_gizmomaptype_ensure(¶ms); @@ -1367,7 +1367,7 @@ static void view3d_main_region_message_subscribe(const wmRegionMessageSubscribeP * accepting some redundant redraws. * * For other space types we might try avoid this, keep the 3D view as an exceptional case! */ - wmMsgParams_RNA msg_key_params = {{0}}; + wmMsgParams_RNA msg_key_params{}; /* Only subscribe to types. */ StructRNA *type_array[] = { @@ -1563,7 +1563,7 @@ static void view3d_header_region_message_subscribe(const wmRegionMessageSubscrib struct wmMsgBus *mbus = params->message_bus; ARegion *region = params->region; - wmMsgParams_RNA msg_key_params = {{0}}; + wmMsgParams_RNA msg_key_params{}; /* Only subscribe to types. */ StructRNA *type_array[] = { @@ -2048,7 +2048,7 @@ static void view3d_blend_write(BlendWriter *writer, SpaceLink *sl) BKE_viewer_path_blend_write(writer, &v3d->viewer_path); } -void ED_spacetype_view3d(void) +void ED_spacetype_view3d() { SpaceType *st = MEM_cnew<SpaceType>("spacetype view3d"); ARegionType *art; diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc index ab77cf3407a..33129dfff5d 100644 --- a/source/blender/editors/space_view3d/view3d_draw.cc +++ b/source/blender/editors/space_view3d/view3d_draw.cc @@ -5,7 +5,7 @@ * \ingroup spview3d */ -#include <math.h> +#include <cmath> #include "BLI_jitter_2d.h" #include "BLI_listbase.h" |