diff --git a/intern/opencolorio/fallback_impl.cc b/intern/opencolorio/fallback_impl.cc index fa9779b5c2a..17faff1d893 100644 --- a/intern/opencolorio/fallback_impl.cc +++ b/intern/opencolorio/fallback_impl.cc @@ -29,7 +29,7 @@ enum TransformType { #define COLORSPACE_SRGB ((OCIO_ConstColorSpaceRcPtr *)2) #define COLORSPACE_DATA ((OCIO_ConstColorSpaceRcPtr *)3) -typedef struct OCIO_PackedImageDescription { +struct OCIO_PackedImageDescription { float *data; long width; long height; @@ -37,7 +37,7 @@ typedef struct OCIO_PackedImageDescription { long chanStrideBytes; long xStrideBytes; long yStrideBytes; -} OCIO_PackedImageDescription; +}; struct FallbackTransform { FallbackTransform() : type(TRANSFORM_UNKNOWN), scale(1.0f), exponent(1.0f) {} diff --git a/source/blender/blenkernel/intern/blendfile.cc b/source/blender/blenkernel/intern/blendfile.cc index ca6fe4643fa..c71425abe76 100644 --- a/source/blender/blenkernel/intern/blendfile.cc +++ b/source/blender/blenkernel/intern/blendfile.cc @@ -227,7 +227,7 @@ static void setup_app_userdef(BlendFileData *bfd) * NOTE: this is only used when actually loading a real `.blend` file, * loading of memfile undo steps does not need it. */ -typedef struct ReuseOldBMainData { +struct ReuseOldBMainData { Main *new_bmain; Main *old_bmain; @@ -245,7 +245,7 @@ typedef struct ReuseOldBMainData { /** Used to find matching IDs by name/lib in new main, to remap ID usages of data ported over * from old main. */ IDNameLib_Map *id_map; -} ReuseOldBMainData; +}; /** Search for all libraries in `old_bmain` that are also in `new_bmain` (i.e. different Library * IDs having the same absolute filepath), and create a remapping rule for these. diff --git a/source/blender/blenkernel/intern/mask_evaluate.cc b/source/blender/blenkernel/intern/mask_evaluate.cc index 03b52535536..5e5f061ec50 100644 --- a/source/blender/blenkernel/intern/mask_evaluate.cc +++ b/source/blender/blenkernel/intern/mask_evaluate.cc @@ -187,11 +187,11 @@ float (*BKE_mask_spline_differentiate( /* ** feather points self-intersection collapse routine ** */ -typedef struct FeatherEdgesBucket { +struct FeatherEdgesBucket { int tot_segment; int (*segments)[2]; int alloc_segment; -} FeatherEdgesBucket; +}; static void feather_bucket_add_edge(FeatherEdgesBucket *bucket, int start, int end) { diff --git a/source/blender/blenkernel/intern/mask_rasterize.cc b/source/blender/blenkernel/intern/mask_rasterize.cc index 25bb3ecfe73..e4fb60817bc 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.cc +++ b/source/blender/blenkernel/intern/mask_rasterize.cc @@ -153,7 +153,7 @@ static ScanFillVert *scanfill_vert_add_v2_with_depth(ScanFillContext *sf_ctx, * * \note internal use only. */ -typedef struct MaskRasterLayer { +struct MaskRasterLayer { /* geometry */ uint face_tot; uint (*face_array)[4]; /* access coords tri/quad */ @@ -175,10 +175,9 @@ typedef struct MaskRasterLayer { char blend; char blend_flag; char falloff; +}; -} MaskRasterLayer; - -typedef struct MaskRasterSplineInfo { +struct MaskRasterSplineInfo { /* body of the spline */ uint vertex_offset; uint vertex_total; @@ -188,7 +187,7 @@ typedef struct MaskRasterSplineInfo { uint vertex_total_cap_tail; bool is_cyclic; -} MaskRasterSplineInfo; +}; /** * opaque local struct for mask pixel lookup, each MaskLayer needs one of these @@ -1424,14 +1423,14 @@ float BKE_maskrasterize_handle_sample(MaskRasterHandle *mr_handle, const float x return value; } -typedef struct MaskRasterizeBufferData { +struct MaskRasterizeBufferData { MaskRasterHandle *mr_handle; float x_inv, y_inv; float x_px_ofs, y_px_ofs; uint width; float *buffer; -} MaskRasterizeBufferData; +}; static void maskrasterize_buffer_cb(void *__restrict userdata, const int y, diff --git a/source/blender/blenkernel/intern/mball_tessellate.cc b/source/blender/blenkernel/intern/mball_tessellate.cc index 56a274df0c9..c372562f361 100644 --- a/source/blender/blenkernel/intern/mball_tessellate.cc +++ b/source/blender/blenkernel/intern/mball_tessellate.cc @@ -48,62 +48,62 @@ /* Data types */ /** Corner of a cube. */ -typedef struct corner { +struct CORNER { int i, j, k; /* (i, j, k) is index within lattice */ float co[3], value; /* location and function value */ - corner *next; -} CORNER; + CORNER *next; +}; /** Partitioning cell (cube). */ -typedef struct cube { +struct CUBE { int i, j, k; /* lattice location of cube */ CORNER *corners[8]; /* eight corners */ -} CUBE; +}; /** Linked list of cubes acting as stack. */ -typedef struct cubes { +struct CUBES { CUBE cube; /* a single cube */ - cubes *next; /* remaining elements */ -} CUBES; + CUBES *next; /* remaining elements */ +}; /** List of cube locations. */ -typedef struct centerlist { +struct CENTERLIST { int i, j, k; /* cube location */ - centerlist *next; /* remaining elements */ -} CENTERLIST; + CENTERLIST *next; /* remaining elements */ +}; /** List of edges. */ -typedef struct edgelist { +struct EDGELIST { int i1, j1, k1, i2, j2, k2; /* edge corner ids */ int vid; /* vertex id */ - edgelist *next; /* remaining elements */ -} EDGELIST; + EDGELIST *next; /* remaining elements */ +}; /** List of integers. */ -typedef struct intlist { +struct INTLIST { int i; /* an integer */ - intlist *next; /* remaining elements */ -} INTLIST; + INTLIST *next; /* remaining elements */ +}; /** List of list of integers. */ -typedef struct intlists { +struct INTLISTS { INTLIST *list; /* a list of integers */ - intlists *next; /* remaining elements */ -} INTLISTS; + INTLISTS *next; /* remaining elements */ +}; /** An AABB with pointer to metal-elem. */ -typedef struct Box { +struct Box { float min[3], max[3]; const MetaElem *ml; -} Box; +}; -typedef struct MetaballBVHNode { /* BVH node */ - Box bb[2]; /* AABB of children */ +struct MetaballBVHNode { /* node */ + Box bb[2]; /* AABB of children */ MetaballBVHNode *child[2]; -} MetaballBVHNode; +}; /** Parameters, storage. */ -typedef struct process { +struct PROCESS { float thresh, size; /* mball threshold, single cube size */ float delta; /* small delta for calculating normals */ uint converge_res; /* converge procedure resolution (more = slower) */ @@ -131,7 +131,7 @@ typedef struct process { /* memory allocation from common pool */ MemArena *pgn_elements; -} PROCESS; +}; /* Forward declarations */ static int vertid(PROCESS *process, const CORNER *c1, const CORNER *c2); diff --git a/source/blender/blenkernel/intern/particle.cc b/source/blender/blenkernel/intern/particle.cc index bde493d0fd5..efef09b2045 100644 --- a/source/blender/blenkernel/intern/particle.cc +++ b/source/blender/blenkernel/intern/particle.cc @@ -1273,7 +1273,7 @@ void psys_interpolate_particle( } } -typedef struct ParticleInterpolationData { +struct ParticleInterpolationData { HairKey *hkey[2]; Mesh *mesh; @@ -1292,7 +1292,7 @@ typedef struct ParticleInterpolationData { /** Die on this frame, see #ParticleData.dietime for details. */ float dietime; int bspline; -} ParticleInterpolationData; +}; /** * Assumes pointcache->mem_cache exists, so for disk cached particles * call #psys_make_temp_pointcache() before use. @@ -3569,14 +3569,14 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra, const bool use_re } } -typedef struct CacheEditrPathsIterData { +struct CacheEditrPathsIterData { Object *object; PTCacheEdit *edit; ParticleSystemModifierData *psmd; ParticleData *pa; int segments; bool use_weight; -} CacheEditrPathsIterData; +}; static void psys_cache_edit_paths_iter(void *__restrict iter_data_v, const int iter, diff --git a/source/blender/blenkernel/intern/tracking.cc b/source/blender/blenkernel/intern/tracking.cc index ee36fc4c57d..2989a136c87 100644 --- a/source/blender/blenkernel/intern/tracking.cc +++ b/source/blender/blenkernel/intern/tracking.cc @@ -54,13 +54,13 @@ #include "libmv-capi.h" #include "tracking_private.h" -typedef struct MovieDistortion { +struct MovieDistortion { libmv_CameraIntrinsics *intrinsics; /* Parameters needed for coordinates normalization. */ float principal_px[2]; float pixel_aspect; float focal; -} MovieDistortion; +}; static struct { ListBase tracks; @@ -164,11 +164,11 @@ void BKE_tracking_free(MovieTracking *tracking) tracking_dopesheet_free(&tracking->dopesheet); } -typedef struct TrackingCopyContext { +struct TrackingCopyContext { /* Map from point and plane track pointer from the source object to the destination object. */ GHash *old_to_new_track_map; GHash *old_to_new_plane_track_map; -} TrackingCopyContext; +}; static TrackingCopyContext tracking_copy_context_new(void) { @@ -1077,11 +1077,11 @@ static bGPDlayer *track_mask_gpencil_layer_get(const MovieTrackingTrack *track) return nullptr; } -typedef struct TrackMaskSetPixelData { +struct TrackMaskSetPixelData { float *mask; int mask_width; int mask_height; -} TrackMaskSetPixelData; +}; static void track_mask_set_pixel_cb(int x, int x_end, int y, void *user_data) { diff --git a/source/blender/blenkernel/intern/tracking_auto.cc b/source/blender/blenkernel/intern/tracking_auto.cc index 8fb7ced533d..4aa182a6732 100644 --- a/source/blender/blenkernel/intern/tracking_auto.cc +++ b/source/blender/blenkernel/intern/tracking_auto.cc @@ -31,16 +31,16 @@ #include "libmv-capi.h" #include "tracking_private.h" -typedef struct AutoTrackClip { +struct AutoTrackClip { MovieClip *clip; /* Dimensions of movie frame, in pixels. * * NOTE: All frames within a clip are expected to have match3ed dimensions. */ int width, height; -} AutoTrackClip; +}; -typedef struct AutoTrackTrack { +struct AutoTrackTrack { /* Index of a clip from `AutoTrackContext::autotrack_clips` this track belongs to. */ int clip_index; @@ -53,11 +53,11 @@ typedef struct AutoTrackTrack { * Is usually initialized based on track's selection. Non-trackable tracks are still added to the * context to provide AutoTrack all knowledge about what is going on in the scene. */ bool is_trackable; -} AutoTrackTrack; +}; -typedef struct AutoTrackMarker { +struct AutoTrackMarker { libmv_Marker libmv_marker; -} AutoTrackMarker; +}; /* Result of tracking step for a single marker. * @@ -65,15 +65,15 @@ typedef struct AutoTrackMarker { * * On failure marker's frame number is initialized to frame number where it was attempted to be * tracked to. The position and other fields of tracked marker are the same as the input. */ -typedef struct AutoTrackTrackingResult { +struct AutoTrackTrackingResult { AutoTrackTrackingResult *next, *prev; bool success; libmv_Marker libmv_marker; libmv_TrackRegionResult libmv_result; -} AutoTrackTrackingResult; +}; -typedef struct AutoTrackContext { +struct AutoTrackContext { /* -------------------------------------------------------------------- * Invariant part. * Stays unchanged during the tracking process. @@ -133,7 +133,7 @@ typedef struct AutoTrackContext { int synchronized_scene_frame; SpinLock spin_lock; -} AutoTrackContext; +}; /* -------------------------------------------------------------------- */ /** \name Marker coordinate system conversion. @@ -624,9 +624,9 @@ void BKE_autotrack_context_start(AutoTrackContext *context) /* NOTE: This is a TLS in a sense that this struct is never accessed from multiple threads, and * that threads are re-using the struct as much as possible. */ -typedef struct AutoTrackTLS { +struct AutoTrackTLS { ListBase results; /* Elements of `AutoTrackTrackingResult`. */ -} AutoTrackTLS; +}; static void autotrack_context_step_cb(void *__restrict userdata, const int marker_index, diff --git a/source/blender/blenkernel/intern/tracking_solver.cc b/source/blender/blenkernel/intern/tracking_solver.cc index 21bf022565e..57ff94a5298 100644 --- a/source/blender/blenkernel/intern/tracking_solver.cc +++ b/source/blender/blenkernel/intern/tracking_solver.cc @@ -32,7 +32,7 @@ #include "libmv-capi.h" #include "tracking_private.h" -typedef struct MovieReconstructContext { +struct MovieReconstructContext { libmv_Tracks *tracks; bool select_keyframes; int keyframe1, keyframe2; @@ -53,15 +53,15 @@ typedef struct MovieReconstructContext { /* Details about reconstruction error, reported by Libmv. */ char error_message[1024]; -} MovieReconstructContext; +}; -typedef struct ReconstructProgressData { +struct ReconstructProgressData { bool *stop; bool *do_update; float *progress; char *stats_message; int message_size; -} ReconstructProgressData; +}; /* Create new libmv Tracks structure from blender's tracks list. */ static libmv_Tracks *libmv_tracks_new(MovieClip *clip, ListBase *tracksbase, int width, int height) diff --git a/source/blender/blenkernel/intern/tracking_stabilize.cc b/source/blender/blenkernel/intern/tracking_stabilize.cc index 14cd5003c45..9b99c816c3f 100644 --- a/source/blender/blenkernel/intern/tracking_stabilize.cc +++ b/source/blender/blenkernel/intern/tracking_stabilize.cc @@ -63,7 +63,7 @@ static float EPSILON_WEIGHT = 0.005f; * This struct with private working data is associated to the local call context * via `StabContext::private_track_data` */ -typedef struct TrackStabilizationBase { +struct TrackStabilizationBase { float stabilization_offset_base[2]; /* measured relative to translated pivot */ @@ -74,19 +74,19 @@ typedef struct TrackStabilizationBase { bool is_init_for_stabilization; FCurve *track_weight_curve; -} TrackStabilizationBase; +}; /* Tracks are reordered for initialization, starting as close as possible to * anchor_frame */ -typedef struct TrackInitOrder { +struct TrackInitOrder { int sort_value; int reference_frame; MovieTrackingTrack *data; -} TrackInitOrder; +}; /* Per frame private working data, for accessing possibly animated values. */ -typedef struct StabContext { +struct StabContext { MovieClip *clip; MovieTracking *tracking; MovieTrackingStabilization *stab; @@ -98,7 +98,7 @@ typedef struct StabContext { FCurve *target_rot; FCurve *target_scale; bool use_animation; -} StabContext; +}; static TrackStabilizationBase *access_stabilization_baseline_data(StabContext *ctx, MovieTrackingTrack *track) @@ -1287,13 +1287,13 @@ void BKE_tracking_stabilization_data_get(MovieClip *clip, typedef void (*interpolation_func)(const ImBuf *, ImBuf *, float, float, int, int); -typedef struct TrackingStabilizeFrameInterpolationData { +struct TrackingStabilizeFrameInterpolationData { ImBuf *ibuf; ImBuf *tmpibuf; float (*mat)[4]; interpolation_func interpolation; -} TrackingStabilizeFrameInterpolationData; +}; static void tracking_stabilize_frame_interpolation_cb(void *__restrict userdata, const int j, diff --git a/source/blender/blenloader/intern/writefile.cc b/source/blender/blenloader/intern/writefile.cc index 6fd08bc96f2..85c4dea5812 100644 --- a/source/blender/blenloader/intern/writefile.cc +++ b/source/blender/blenloader/intern/writefile.cc @@ -1094,11 +1094,11 @@ static void write_thumb(WriteData *wd, const BlendThumbnail *thumb) #define ID_BUFFER_STATIC_SIZE 8192 -typedef struct BLO_Write_IDBuffer { +struct BLO_Write_IDBuffer { const IDTypeInfo *id_type; ID *temp_id; char id_buffer_static[ID_BUFFER_STATIC_SIZE]; -} BLO_Write_IDBuffer; +}; static void id_buffer_init_for_id_type(BLO_Write_IDBuffer *id_buffer, const IDTypeInfo *id_type) { diff --git a/source/blender/bmesh/intern/bmesh_interp.cc b/source/blender/bmesh/intern/bmesh_interp.cc index 5229d5ebf99..1e91040763b 100644 --- a/source/blender/bmesh/intern/bmesh_interp.cc +++ b/source/blender/bmesh/intern/bmesh_interp.cc @@ -405,7 +405,7 @@ static void bm_loop_flip_disp(const float source_axis_x[3], disp[1] = (mat[0][0] * b[1] - b[0] * mat[1][0]) / d; } -typedef struct BMLoopInterpMultiresData { +struct BMLoopInterpMultiresData { BMLoop *l_dst; BMLoop *l_src_first; int cd_loop_mdisp_offset; @@ -419,7 +419,7 @@ typedef struct BMLoopInterpMultiresData { int res; float d; -} BMLoopInterpMultiresData; +}; static void loop_interp_multires_cb(void *__restrict userdata, const int ix, diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.cc b/source/blender/bmesh/intern/bmesh_mesh_normals.cc index 70ca23ce842..55b4ca85415 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_normals.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_normals.cc @@ -50,14 +50,14 @@ static void bm_edge_tag_from_smooth(const float (*fnos)[3], * assuming no other tool using it would run concurrently to clnors editing. */ #define BM_LNORSPACE_UPDATE _FLAG_MF -typedef struct BMVertsCalcNormalsWithCoordsData { +struct BMVertsCalcNormalsWithCoordsData { /* Read-only data. */ const float (*fnos)[3]; const float (*vcos)[3]; /* Write data. */ float (*vnos)[3]; -} BMVertsCalcNormalsWithCoordsData; +}; BLI_INLINE void bm_vert_calc_normals_accum_loop(const BMLoop *l_iter, const float e1diff[3], @@ -1161,7 +1161,7 @@ static void bm_mesh_loops_calc_normals__single_threaded(BMesh *bm, } } -typedef struct BMLoopsCalcNormalsWithCoordsData { +struct BMLoopsCalcNormalsWithCoordsData { /* Read-only data. */ const float (*fnos)[3]; const float (*vcos)[3]; @@ -1174,15 +1174,15 @@ typedef struct BMLoopsCalcNormalsWithCoordsData { /* Output. */ float (*r_lnos)[3]; MLoopNorSpaceArray *r_lnors_spacearr; -} BMLoopsCalcNormalsWithCoordsData; +}; -typedef struct BMLoopsCalcNormalsWithCoords_TLS { +struct BMLoopsCalcNormalsWithCoords_TLS { blender::Vector *edge_vectors; /** Copied from #BMLoopsCalcNormalsWithCoordsData.r_lnors_spacearr when it's not nullptr. */ MLoopNorSpaceArray *lnors_spacearr; MLoopNorSpaceArray lnors_spacearr_buf; -} BMLoopsCalcNormalsWithCoords_TLS; +}; static void bm_mesh_loops_calc_normals_for_vert_init_fn(const void *__restrict userdata, void *__restrict chunk) diff --git a/source/blender/draw/engines/overlay/overlay_outline.cc b/source/blender/draw/engines/overlay/overlay_outline.cc index 94526ce4237..67d6f08138e 100644 --- a/source/blender/draw/engines/overlay/overlay_outline.cc +++ b/source/blender/draw/engines/overlay/overlay_outline.cc @@ -171,12 +171,12 @@ void OVERLAY_outline_cache_init(OVERLAY_Data *vedata) } } -typedef struct iterData { +struct iterData { Object *ob; DRWShadingGroup *stroke_grp; int cfra; float plane[4]; -} iterData; +}; static void gpencil_layer_cache_populate(bGPDlayer *gpl, bGPDframe * /*gpf*/, diff --git a/source/blender/draw/engines/select/select_instance.cc b/source/blender/draw/engines/select/select_instance.cc index e9e31d5ffe2..a2c6b206dfa 100644 --- a/source/blender/draw/engines/select/select_instance.cc +++ b/source/blender/draw/engines/select/select_instance.cc @@ -23,7 +23,7 @@ using namespace blender::draw; using Instance = overlay::Instance; -typedef struct SELECT_NextData { +struct SELECT_NextData { void *engine_type; DRWViewportEmptyList *fbl; DRWViewportEmptyList *txl; @@ -31,7 +31,7 @@ typedef struct SELECT_NextData { DRWViewportEmptyList *stl; Instance *instance; -} SELECT_NextData; +}; static void SELECT_next_engine_init(void *vedata) { diff --git a/source/blender/draw/intern/draw_manager_profiling.cc b/source/blender/draw/intern/draw_manager_profiling.cc index 20a4404dee4..18474b32ca5 100644 --- a/source/blender/draw/intern/draw_manager_profiling.cc +++ b/source/blender/draw/intern/draw_manager_profiling.cc @@ -30,13 +30,13 @@ #define MIM_RANGE_LEN 8 #define GPU_TIMER_FALLOFF 0.1 -typedef struct DRWTimer { +struct DRWTimer { uint32_t query[2]; uint64_t time_average; char name[MAX_TIMER_NAME]; int lvl; /* Hierarchy level for nested timer. */ bool is_query; /* Does this timer actually perform queries or is it just a group. */ -} DRWTimer; +}; static struct DRWTimerPool { DRWTimer *timers; diff --git a/source/blender/editors/animation/anim_filter.cc b/source/blender/editors/animation/anim_filter.cc index 343df2f6ffa..89a7db5920f 100644 --- a/source/blender/editors/animation/anim_filter.cc +++ b/source/blender/editors/animation/anim_filter.cc @@ -2359,7 +2359,7 @@ static size_t animdata_filter_ds_materials( /* ............ */ /* Temporary context for modifier linked-data channel extraction */ -typedef struct tAnimFilterModifiersContext { +struct tAnimFilterModifiersContext { bAnimContext *ac; /* anim editor context */ bDopeSheet *ads; /* dopesheet filtering settings */ @@ -2367,7 +2367,7 @@ typedef struct tAnimFilterModifiersContext { size_t items; /* number of channels created */ int filter_mode; /* flags for stuff we want to filter */ -} tAnimFilterModifiersContext; +}; /* dependency walker callback for modifier dependencies */ static void animfilter_modifier_idpoin_cb(void *afm_ptr, Object *ob, ID **idpoin, int /*cb_flag*/) diff --git a/source/blender/editors/armature/editarmature_undo.cc b/source/blender/editors/armature/editarmature_undo.cc index 95fcad9886a..a04a79b4a9e 100644 --- a/source/blender/editors/armature/editarmature_undo.cc +++ b/source/blender/editors/armature/editarmature_undo.cc @@ -42,11 +42,11 @@ static CLG_LogRef LOG = {"ed.undo.armature"}; /** \name Undo Conversion * \{ */ -typedef struct UndoArmature { +struct UndoArmature { EditBone *act_edbone; ListBase lb; size_t undo_size; -} UndoArmature; +}; static void undoarm_to_editarm(UndoArmature *uarm, bArmature *arm) { @@ -119,17 +119,17 @@ static Object *editarm_object_from_context(bContext *C) * \note This is similar for all edit-mode types. * \{ */ -typedef struct ArmatureUndoStep_Elem { +struct ArmatureUndoStep_Elem { ArmatureUndoStep_Elem *next, *prev; UndoRefID_Object obedit_ref; UndoArmature data; -} ArmatureUndoStep_Elem; +}; -typedef struct ArmatureUndoStep { +struct ArmatureUndoStep { UndoStep step; ArmatureUndoStep_Elem *elems; uint elems_len; -} ArmatureUndoStep; +}; static bool armature_undosys_poll(bContext *C) { diff --git a/source/blender/editors/armature/meshlaplacian.cc b/source/blender/editors/armature/meshlaplacian.cc index 77083e85496..59dd79b07d9 100644 --- a/source/blender/editors/armature/meshlaplacian.cc +++ b/source/blender/editors/armature/meshlaplacian.cc @@ -366,11 +366,11 @@ float laplacian_system_get_solution(LaplacianSystem *sys, int v) #define WEIGHT_LIMIT_END 0.025f #define DISTANCE_EPSILON 1e-4f -typedef struct BVHCallbackUserData { +struct BVHCallbackUserData { float start[3]; float vec[3]; LaplacianSystem *sys; -} BVHCallbackUserData; +}; static void bvh_callback(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) { @@ -868,7 +868,7 @@ static const int MESHDEFORM_OFFSET[7][3] = { {0, 0, -1}, }; -typedef struct MDefBoundIsect { +struct MDefBoundIsect { /* intersection on the cage 'cagecos' */ float co[3]; /* non-facing intersections are considered interior */ @@ -879,15 +879,15 @@ typedef struct MDefBoundIsect { float len; /* weights aligned with the polygons's loop indices */ float poly_weights[0]; -} MDefBoundIsect; +}; -typedef struct MDefBindInfluence { +struct MDefBindInfluence { MDefBindInfluence *next; float weight; int vertex; -} MDefBindInfluence; +}; -typedef struct MeshDeformBind { +struct MeshDeformBind { /* grid dimensions */ float min[3], max[3]; float width[3], halfwidth[3]; @@ -926,9 +926,9 @@ typedef struct MeshDeformBind { blender::Span looptri_polys; blender::Span poly_normals; } cagemesh_cache; -} MeshDeformBind; +}; -typedef struct MeshDeformIsect { +struct MeshDeformIsect { float start[3]; float vec[3]; float vec_length; @@ -936,8 +936,7 @@ typedef struct MeshDeformIsect { bool isect; float u, v; - -} MeshDeformIsect; +}; /* ray intersection */ diff --git a/source/blender/editors/curve/editcurve_undo.cc b/source/blender/editors/curve/editcurve_undo.cc index 6e6ccb57958..52cee4a5cd9 100644 --- a/source/blender/editors/curve/editcurve_undo.cc +++ b/source/blender/editors/curve/editcurve_undo.cc @@ -183,16 +183,16 @@ static Object *editcurve_object_from_context(bContext *C) * \note This is similar for all edit-mode types. * \{ */ -typedef struct CurveUndoStep_Elem { +struct CurveUndoStep_Elem { UndoRefID_Object obedit_ref; UndoCurve data; -} CurveUndoStep_Elem; +}; -typedef struct CurveUndoStep { +struct CurveUndoStep { UndoStep step; CurveUndoStep_Elem *elems; uint elems_len; -} CurveUndoStep; +}; static bool curve_undosys_poll(bContext *C) { diff --git a/source/blender/editors/gpencil_legacy/gpencil_undo.cc b/source/blender/editors/gpencil_legacy/gpencil_undo.cc index 76df5e2704c..5d2f4f87d5b 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_undo.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_undo.cc @@ -32,12 +32,12 @@ #include "gpencil_intern.h" -typedef struct bGPundonode { +struct bGPundonode { bGPundonode *next, *prev; char name[BKE_UNDO_STR_MAX]; bGPdata *gpd; -} bGPundonode; +}; static ListBase undo_nodes = {nullptr, nullptr}; static bGPundonode *cur_node = nullptr; diff --git a/source/blender/editors/mask/mask_ops.cc b/source/blender/editors/mask/mask_ops.cc index 36e976e75ce..d975893c65d 100644 --- a/source/blender/editors/mask/mask_ops.cc +++ b/source/blender/editors/mask/mask_ops.cc @@ -198,7 +198,7 @@ enum { SLIDE_ACTION_SPLINE = 4, }; -typedef struct SlidePointData { +struct SlidePointData { /* Generic fields. */ short event_invoke_type; int action; @@ -235,7 +235,7 @@ typedef struct SlidePointData { /* Feather sliding. */ float prev_feather_coord[2]; float weight, weight_scalar; -} SlidePointData; +}; static void mask_point_undistort_pos(SpaceClip *sc, float r_co[2], const float co[2]) { @@ -937,7 +937,7 @@ void MASK_OT_slide_point(wmOperatorType *ot) /******************** slide spline curvature *********************/ -typedef struct SlideSplineCurvatureData { +struct SlideSplineCurvatureData { short event_invoke_type; Mask *mask; @@ -954,7 +954,7 @@ typedef struct SlideSplineCurvatureData { float prev_spline_coord[2]; float P0[2], P1[2], P2[2], P3[3]; -} SlideSplineCurvatureData; +}; static void cancel_slide_spline_curvature(SlideSplineCurvatureData *slide_data) { diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.cc b/source/blender/editors/sculpt_paint/sculpt_undo.cc index 4e22fc90642..796686c7c6a 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.cc +++ b/source/blender/editors/sculpt_paint/sculpt_undo.cc @@ -126,20 +126,20 @@ #define NO_ACTIVE_LAYER ATTR_DOMAIN_AUTO -typedef struct UndoSculpt { +struct UndoSculpt { ListBase nodes; size_t undo_size; -} UndoSculpt; +}; -typedef struct SculptAttrRef { +struct SculptAttrRef { eAttrDomain domain; eCustomDataType type; char name[MAX_CUSTOMDATA_LAYER_NAME]; bool was_set; -} SculptAttrRef; +}; -typedef struct SculptUndoStep { +struct SculptUndoStep { UndoStep step; /* NOTE: will split out into list for multi-object-sculpt-mode. */ UndoSculpt data; @@ -155,7 +155,7 @@ typedef struct SculptUndoStep { #ifdef SCULPT_UNDO_DEBUG int id; #endif -} SculptUndoStep; +}; static UndoSculpt *sculpt_undo_get_nodes(void); static bool sculpt_attribute_ref_equals(SculptAttrRef *a, SculptAttrRef *b); diff --git a/source/blender/editors/space_clip/clip_draw.cc b/source/blender/editors/space_clip/clip_draw.cc index 40e133b3250..eaba9c228ed 100644 --- a/source/blender/editors/space_clip/clip_draw.cc +++ b/source/blender/editors/space_clip/clip_draw.cc @@ -393,10 +393,10 @@ enum { PATH_POINT_FLAG_KEYFRAME = (1 << 0), }; -typedef struct TrachPathPoint { +struct TrackPathPoint { float co[2]; uchar flag; -} TrackPathPoint; +}; static void marker_to_path_point(SpaceClip *sc, const MovieTrackingTrack *track, diff --git a/source/blender/editors/space_clip/clip_editor.cc b/source/blender/editors/space_clip/clip_editor.cc index ac997394385..c0c546889dc 100644 --- a/source/blender/editors/space_clip/clip_editor.cc +++ b/source/blender/editors/space_clip/clip_editor.cc @@ -655,7 +655,7 @@ void ED_space_clip_set_mask(bContext *C, SpaceClip *sc, Mask *mask) /** \name Pre-Fetching Functions * \{ */ -typedef struct PrefetchJob { +struct PrefetchJob { /** Clip into which cache the frames will be pre-fetched into. */ MovieClip *clip; @@ -668,9 +668,9 @@ typedef struct PrefetchJob { int start_frame, current_frame, end_frame; short render_size, render_flag; -} PrefetchJob; +}; -typedef struct PrefetchQueue { +struct PrefetchQueue { int initial_frame, current_frame, start_frame, end_frame; short render_size, render_flag; @@ -684,7 +684,7 @@ typedef struct PrefetchQueue { bool *stop; bool *do_update; float *progress; -} PrefetchQueue; +}; /* check whether pre-fetching is allowed */ static bool check_prefetch_break(void) diff --git a/source/blender/editors/space_clip/clip_graph_draw.cc b/source/blender/editors/space_clip/clip_graph_draw.cc index 9e4617c2ef8..c1e7352205a 100644 --- a/source/blender/editors/space_clip/clip_graph_draw.cc +++ b/source/blender/editors/space_clip/clip_graph_draw.cc @@ -32,13 +32,13 @@ #include "clip_intern.h" /* own include */ -typedef struct TrackMotionCurveUserData { +struct TrackMotionCurveUserData { SpaceClip *sc; MovieTrackingTrack *act_track; bool sel; float xscale, yscale, hsize; uint pos; -} TrackMotionCurveUserData; +}; static void tracking_segment_point_cb(void *userdata, MovieTrackingTrack * /*track*/, diff --git a/source/blender/editors/space_clip/clip_graph_ops.cc b/source/blender/editors/space_clip/clip_graph_ops.cc index a53c6fd4c12..4e97c237a07 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.cc +++ b/source/blender/editors/space_clip/clip_graph_ops.cc @@ -347,10 +347,10 @@ void CLIP_OT_graph_select(wmOperatorType *ot) /********************** box select operator *********************/ -typedef struct BoxSelectuserData { +struct BoxSelectuserData { rctf rect; bool select, extend, changed; -} BoxSelectuserData; +}; static void box_select_cb(void *userdata, MovieTrackingTrack * /*track*/, diff --git a/source/blender/editors/space_clip/clip_ops.cc b/source/blender/editors/space_clip/clip_ops.cc index 8b5d558a13a..e6a3d87bcc4 100644 --- a/source/blender/editors/space_clip/clip_ops.cc +++ b/source/blender/editors/space_clip/clip_ops.cc @@ -357,13 +357,13 @@ void CLIP_OT_reload(wmOperatorType *ot) /** \name View Pan Operator * \{ */ -typedef struct ViewPanData { +struct ViewPanData { float x, y; float xof, yof, xorig, yorig; int launch_event; bool own_cursor; float *vec; -} ViewPanData; +}; static void view_pan_init(bContext *C, wmOperator *op, const wmEvent *event) { @@ -530,7 +530,7 @@ void CLIP_OT_view_pan(wmOperatorType *ot) /** \name View Zoom Operator * \{ */ -typedef struct ViewZoomData { +struct ViewZoomData { float x, y; float zoom; int launch_event; @@ -538,7 +538,7 @@ typedef struct ViewZoomData { wmTimer *timer; double timer_lastdraw; bool own_cursor; -} ViewZoomData; +}; static void view_zoom_init(bContext *C, wmOperator *op, const wmEvent *event) { @@ -1168,14 +1168,14 @@ void CLIP_OT_change_frame(wmOperatorType *ot) /** \name Rebuild Proxies Operator * \{ */ -typedef struct ProxyBuildJob { +struct ProxyJob { Scene *scene; Main *main; MovieClip *clip; int clip_flag; bool stop; IndexBuildContext *index_context; -} ProxyJob; +}; static void proxy_freejob(void *pjv) { @@ -1280,7 +1280,7 @@ static void do_movie_proxy(void *pjv, * thread for maximal speed */ -typedef struct ProxyQueue { +struct ProxyQueue { int cfra; int sfra; int efra; @@ -1289,14 +1289,14 @@ typedef struct ProxyQueue { const bool *stop; bool *do_update; float *progress; -} ProxyQueue; +}; -typedef struct ProxyThread { +struct ProxyThread { MovieClip *clip; MovieDistortion *distortion; int *build_sizes, build_count; int *build_undistort_sizes, build_undistort_count; -} ProxyThread; +}; static uchar *proxy_thread_next_frame(ProxyQueue *queue, MovieClip *clip, diff --git a/source/blender/editors/space_clip/tracking_ops_plane.cc b/source/blender/editors/space_clip/tracking_ops_plane.cc index bd52edd81f7..e5cd20bfd8a 100644 --- a/source/blender/editors/space_clip/tracking_ops_plane.cc +++ b/source/blender/editors/space_clip/tracking_ops_plane.cc @@ -81,7 +81,7 @@ void CLIP_OT_create_plane_track(wmOperatorType *ot) /********************** Slide plane marker corner operator *********************/ -typedef struct SlidePlaneMarkerData { +struct SlidePlaneMarkerData { int launch_event; MovieTrackingPlaneTrack *plane_track; MovieTrackingPlaneMarker *plane_marker; @@ -92,7 +92,7 @@ typedef struct SlidePlaneMarkerData { float previous_corner[2]; float old_corner[2]; bool accurate; -} SlidePlaneMarkerData; +}; static MovieTrackingPlaneTrack *tracking_plane_marker_check_slide(bContext *C, const wmEvent *event, diff --git a/source/blender/editors/space_clip/tracking_ops_track.cc b/source/blender/editors/space_clip/tracking_ops_track.cc index b591d470c41..486ab0cbb6c 100644 --- a/source/blender/editors/space_clip/tracking_ops_track.cc +++ b/source/blender/editors/space_clip/tracking_ops_track.cc @@ -38,7 +38,7 @@ /********************** Track operator *********************/ -typedef struct TrackMarkersJob { +struct TrackMarkersJob { AutoTrackContext *context; /* Tracking context */ int sfra, efra, lastfra; /* Start, end and recently tracked frames */ int backwards; /* Backwards tracking flag */ @@ -50,7 +50,7 @@ typedef struct TrackMarkersJob { Main *main; Scene *scene; bScreen *screen; -} TrackMarkersJob; +}; static bool track_markers_testbreak(void) { diff --git a/source/blender/editors/space_info/textview.hh b/source/blender/editors/space_info/textview.hh index af153b75774..42b3373d363 100644 --- a/source/blender/editors/space_info/textview.hh +++ b/source/blender/editors/space_info/textview.hh @@ -17,7 +17,7 @@ enum eTextViewContext_LineFlag { }; ENUM_OPERATORS(eTextViewContext_LineFlag, TVC_LINE_ICON_BG) -typedef struct TextViewContext { +struct TextViewContext { /** Font size scaled by the interface size. */ int lheight; /** Text selection, when a selection range is in use. */ @@ -59,8 +59,7 @@ typedef struct TextViewContext { int iter_char_end; /** Internal iterator use. */ int iter_tmp; - -} TextViewContext; +}; /** * \param r_mval_pick_item: The resulting item clicked on using \a mval_init. diff --git a/source/blender/editors/space_outliner/outliner_intern.hh b/source/blender/editors/space_outliner/outliner_intern.hh index 3c784d24f9f..a1bf70c9939 100644 --- a/source/blender/editors/space_outliner/outliner_intern.hh +++ b/source/blender/editors/space_outliner/outliner_intern.hh @@ -282,9 +282,9 @@ TreeElement *outliner_add_collection_recursive(SpaceOutliner *space_outliner, bool outliner_requires_rebuild_on_select_or_active_change( const struct SpaceOutliner *space_outliner); -typedef struct IDsSelectedData { +struct IDsSelectedData { struct ListBase selected_array; -} IDsSelectedData; +}; TreeTraversalAction outliner_collect_selected_collections(TreeElement *te, void *customdata); TreeTraversalAction outliner_collect_selected_objects(TreeElement *te, void *customdata); diff --git a/source/blender/editors/space_sequencer/sequencer_gizmo_retime.cc b/source/blender/editors/space_sequencer/sequencer_gizmo_retime.cc index 406693ce98e..c7f5010cd1b 100644 --- a/source/blender/editors/space_sequencer/sequencer_gizmo_retime.cc +++ b/source/blender/editors/space_sequencer/sequencer_gizmo_retime.cc @@ -33,12 +33,12 @@ /* Own include. */ #include "sequencer_intern.h" -typedef struct GizmoGroup_retime { +struct GizmoGroup_retime { wmGizmo *add_handle_gizmo; wmGizmo *move_handle_gizmo; wmGizmo *remove_handle_gizmo; wmGizmo *speed_set_gizmo; -} GizmoGroup_retime; +}; static bool gizmogroup_retime_poll(const bContext *C, wmGizmoGroupType *gzgt) { diff --git a/source/blender/editors/space_sequencer/sequencer_gizmo_retime_type.cc b/source/blender/editors/space_sequencer/sequencer_gizmo_retime_type.cc index cc93c7a9a5b..1318fdcbf67 100644 --- a/source/blender/editors/space_sequencer/sequencer_gizmo_retime_type.cc +++ b/source/blender/editors/space_sequencer/sequencer_gizmo_retime_type.cc @@ -166,19 +166,19 @@ static bool mouse_is_inside_box(const rctf *box, const int mval[2]) /** \name Retiming Add Handle Gizmo * \{ */ -typedef struct RetimeButtonGizmo { +struct RetimeButtonGizmo { wmGizmo gizmo; int icon_id; const Sequence *seq_under_mouse; bool is_mouse_over_gizmo; -} RetimeButtonGizmo; +}; -typedef struct ButtonDimensions { +struct ButtonDimensions { float height; float width; float x; float y; -} ButtonDimensions; +}; static ButtonDimensions button_dimensions_get(const bContext *C, const RetimeButtonGizmo *gizmo) { @@ -329,12 +329,12 @@ enum eHandleMoveOperation { MAKE_FREEZE_FRAME, }; -typedef struct RetimeHandleMoveGizmo { +struct RetimeHandleMoveGizmo { wmGizmo gizmo; const Sequence *mouse_over_seq; int mouse_over_handle_x; eHandleMoveOperation operation; -} RetimeHandleMoveGizmo; +}; static void retime_handle_draw(const bContext *C, const RetimeHandleMoveGizmo *gizmo, diff --git a/source/blender/editors/space_text/text_format.hh b/source/blender/editors/space_text/text_format.hh index f63d98c9393..feef05ed2d3 100644 --- a/source/blender/editors/space_text/text_format.hh +++ b/source/blender/editors/space_text/text_format.hh @@ -65,7 +65,7 @@ void text_format_fill(const char **str_p, char **fmt_p, char type, int len); void text_format_fill_ascii(const char **str_p, char **fmt_p, char type, int len); /* *** Generalize Formatting *** */ -typedef struct TextFormatType { +struct TextFormatType { struct TextFormatType *next, *prev; char (*format_identifier)(const char *string); @@ -85,7 +85,7 @@ typedef struct TextFormatType { /** The prefix of a single-line line comment (without trailing space). */ const char *comment_line; -} TextFormatType; +}; enum { /** White-space */ diff --git a/source/blender/editors/undo/memfile_undo.cc b/source/blender/editors/undo/memfile_undo.cc index da2f3e97886..9c78b38c146 100644 --- a/source/blender/editors/undo/memfile_undo.cc +++ b/source/blender/editors/undo/memfile_undo.cc @@ -51,10 +51,10 @@ /** \name Implements ED Undo System * \{ */ -typedef struct MemFileUndoStep { +struct MemFileUndoStep { UndoStep step; MemFileUndoData *data; -} MemFileUndoStep; +}; static bool memfile_undosys_poll(bContext *C) { diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh index aa5e8ea8f6a..92d97317bce 100644 --- a/source/blender/gpu/intern/gpu_shader_interface.hh +++ b/source/blender/gpu/intern/gpu_shader_interface.hh @@ -24,7 +24,7 @@ namespace blender::gpu { -typedef struct ShaderInput { +struct ShaderInput { uint32_t name_offset; uint32_t name_hash; /** @@ -38,7 +38,7 @@ typedef struct ShaderInput { int32_t location; /** Defined at interface creation or in shader. Only for Samplers, UBOs and Vertex Attributes. */ int32_t binding; -} ShaderInput; +}; /** * Implementation of Shader interface. diff --git a/source/blender/imbuf/intern/colormanagement.cc b/source/blender/imbuf/intern/colormanagement.cc index b51498a841b..fa68e12b096 100644 --- a/source/blender/imbuf/intern/colormanagement.cc +++ b/source/blender/imbuf/intern/colormanagement.cc @@ -90,11 +90,11 @@ float imbuf_aces_to_scene_linear[3][3] = {{0.0f}}; */ static pthread_mutex_t processor_lock = BLI_MUTEX_INITIALIZER; -typedef struct ColormanageProcessor { +struct ColormanageProcessor { OCIO_ConstCPUProcessorRcPtr *cpu_processor; CurveMapping *curve_mapping; bool is_data_result; -} ColormanageProcessor; +}; static struct global_gpu_state { /* GPU shader currently bound. */ @@ -185,7 +185,7 @@ static struct global_color_picking_state { * requiring to pass all variables which affects on display buffer * to color management cache system and keeps calls small and nice. */ -typedef struct ColormanageCacheViewSettings { +struct ColormanageCacheViewSettings { int flag; int look; int view; @@ -193,18 +193,18 @@ typedef struct ColormanageCacheViewSettings { float gamma; float dither; CurveMapping *curve_mapping; -} ColormanageCacheViewSettings; +}; -typedef struct ColormanageCacheDisplaySettings { +struct ColormanageCacheDisplaySettings { int display; -} ColormanageCacheDisplaySettings; +}; -typedef struct ColormanageCacheKey { +struct ColormanageCacheKey { int view; /* view transformation used for display buffer */ int display; /* display device name */ -} ColormanageCacheKey; +}; -typedef struct ColormanageCacheData { +struct ColormanageCacheData { int flag; /* view flags of cached buffer */ int look; /* Additional artistic transform. */ float exposure; /* exposure value cached buffer is calculated with */ @@ -212,13 +212,13 @@ typedef struct ColormanageCacheData { float dither; /* dither value cached buffer is calculated with */ CurveMapping *curve_mapping; /* curve mapping used for cached buffer */ int curve_mapping_timestamp; /* time stamp of curve mapping used for cached buffer */ -} ColormanageCacheData; +}; -typedef struct ColormanageCache { +struct ColormanageCache { MovieCache *moviecache; ColormanageCacheData *data; -} ColormanageCache; +}; static MovieCache *colormanage_moviecache_get(const ImBuf *ibuf) { @@ -1412,7 +1412,7 @@ const float *IMB_colormanagement_get_xyz_to_scene_linear(void) /** \name Threaded Display Buffer Transform Routines * \{ */ -typedef struct DisplayBufferThread { +struct DisplayBufferThread { ColormanageProcessor *cm_processor; const float *buffer; @@ -1432,9 +1432,9 @@ typedef struct DisplayBufferThread { const char *byte_colorspace; const char *float_colorspace; -} DisplayBufferThread; +}; -typedef struct DisplayBufferInitData { +struct DisplayBufferInitData { ImBuf *ibuf; ColormanageProcessor *cm_processor; const float *buffer; @@ -1447,7 +1447,7 @@ typedef struct DisplayBufferInitData { const char *byte_colorspace; const char *float_colorspace; -} DisplayBufferInitData; +}; static void display_buffer_init_handle(void *handle_v, int start_line, @@ -1784,7 +1784,7 @@ static void colormanage_display_buffer_process(ImBuf *ibuf, /** \name Threaded Processor Transform Routines * \{ */ -typedef struct ProcessorTransformThread { +struct ProcessorTransformThread { ColormanageProcessor *cm_processor; uchar *byte_buffer; float *float_buffer; @@ -1794,9 +1794,9 @@ typedef struct ProcessorTransformThread { int channels; bool predivide; bool float_from_byte; -} ProcessorTransformThread; +}; -typedef struct ProcessorTransformInit { +struct ProcessorTransformInitData { ColormanageProcessor *cm_processor; uchar *byte_buffer; float *float_buffer; @@ -1805,7 +1805,7 @@ typedef struct ProcessorTransformInit { int channels; bool predivide; bool float_from_byte; -} ProcessorTransformInitData; +}; static void processor_transform_init_handle(void *handle_v, int start_line, @@ -2223,14 +2223,14 @@ void IMB_colormanagement_imbuf_to_byte_texture(uchar *out_buffer, } } -typedef struct ImbufByteToFloatData { +struct ImbufByteToFloatData { OCIO_ConstCPUProcessorRcPtr *processor; int width; int offset, stride; const uchar *in_buffer; float *out_buffer; bool use_premultiply; -} ImbufByteToFloatData; +}; static void imbuf_byte_to_float_cb(void *__restrict userdata, const int y, @@ -3519,7 +3519,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, } } -typedef struct PartialThreadData { +struct PartialThreadData { ImBuf *ibuf; uchar *display_buffer; const float *linear_buffer; @@ -3529,7 +3529,7 @@ typedef struct PartialThreadData { int linear_offset_x, linear_offset_y; ColormanageProcessor *cm_processor; int xmin, ymin, xmax; -} PartialThreadData; +}; static void partial_buffer_update_rect_thread_do(void *data_v, int scanline) { diff --git a/source/blender/imbuf/intern/divers.cc b/source/blender/imbuf/intern/divers.cc index 125d696a403..b793d7ce08c 100644 --- a/source/blender/imbuf/intern/divers.cc +++ b/source/blender/imbuf/intern/divers.cc @@ -24,9 +24,9 @@ /** \name Floyd-Steinberg dithering * \{ */ -typedef struct DitherContext { +struct DitherContext { float dither; -} DitherContext; +}; static DitherContext *create_dither_context(float dither) { @@ -504,7 +504,7 @@ void IMB_buffer_float_from_float(float *rect_to, } } -typedef struct FloatToFloatThreadData { +struct FloatToFloatThreadData { float *rect_to; const float *rect_from; int channels_from; @@ -514,7 +514,7 @@ typedef struct FloatToFloatThreadData { int width; int stride_to; int stride_from; -} FloatToFloatThreadData; +}; static void imb_buffer_float_from_float_thread_do(void *data_v, int scanline) { diff --git a/source/blender/imbuf/intern/imageprocess.cc b/source/blender/imbuf/intern/imageprocess.cc index a102358c2bb..ceb11fe4183 100644 --- a/source/blender/imbuf/intern/imageprocess.cc +++ b/source/blender/imbuf/intern/imageprocess.cc @@ -398,10 +398,10 @@ void IMB_processor_apply_threaded( BLI_task_pool_free(task_pool); } -typedef struct ScanlineGlobalData { +struct ScanlineGlobalData { void *custom_data; ScanlineThreadFunc do_thread; -} ScanlineGlobalData; +}; static void processor_apply_parallel(void *__restrict userdata, const int scanline, diff --git a/source/blender/imbuf/intern/indexer.cc b/source/blender/imbuf/intern/indexer.cc index 53639132596..4f29691c38c 100644 --- a/source/blender/imbuf/intern/indexer.cc +++ b/source/blender/imbuf/intern/indexer.cc @@ -460,9 +460,9 @@ static void get_tc_filepath(anim *anim, IMB_Timecode_Type tc, char *filepath) * - common rebuilder structures * ---------------------------------------------------------------------- */ -typedef struct IndexBuildContext { +struct IndexBuildContext { int anim_type; -} IndexBuildContext; +}; /* ---------------------------------------------------------------------- * - ffmpeg rebuilder @@ -788,7 +788,7 @@ static void free_proxy_output_ffmpeg(proxy_output_ctx *ctx, int rollback) MEM_freeN(ctx); } -typedef struct FFmpegIndexBuilderContext { +struct FFmpegIndexBuilderContext { int anim_type; AVFormatContext *iFormatCtx; @@ -820,7 +820,7 @@ typedef struct FFmpegIndexBuilderContext { bool build_only_on_bad_performance; bool building_cancelled; -} FFmpegIndexBuilderContext; +}; static IndexBuildContext *index_ffmpeg_create_context(anim *anim, int tcs_in_use, @@ -1243,13 +1243,13 @@ static bool indexer_need_to_build_proxy(FFmpegIndexBuilderContext *context) * ---------------------------------------------------------------------- */ #ifdef WITH_AVI -typedef struct FallbackIndexBuilderContext { +struct FallbackIndexBuilderContext { int anim_type; struct anim *anim; AviMovie *proxy_ctx[IMB_PROXY_MAX_SLOT]; int proxy_sizes_in_use; -} FallbackIndexBuilderContext; +}; static AviMovie *alloc_proxy_output_avi( anim *anim, char *filepath, int width, int height, int quality) diff --git a/source/blender/imbuf/intern/iris.cc b/source/blender/imbuf/intern/iris.cc index 454b649b94c..b67875d7748 100644 --- a/source/blender/imbuf/intern/iris.cc +++ b/source/blender/imbuf/intern/iris.cc @@ -68,10 +68,10 @@ BLI_STATIC_ASSERT(sizeof(IMAGE) == HEADER_SIZE, "Invalid header size"); // #define RLE_NOP 0x00 /* local struct for mem access */ -typedef struct MFileOffset { +struct MFileOffset { const uchar *_file_data; uint _file_offset; -} MFileOffset; +}; #define MFILE_DATA(inf) ((void)0, ((inf)->_file_data + (inf)->_file_offset)) #define MFILE_STEP(inf, step) \ diff --git a/source/blender/imbuf/intern/jp2.cc b/source/blender/imbuf/intern/jp2.cc index 31499873548..e4ec6675336 100644 --- a/source/blender/imbuf/intern/jp2.cc +++ b/source/blender/imbuf/intern/jp2.cc @@ -28,7 +28,7 @@ static const char J2K_HEAD[] = {0xFF, 0x4F, 0xFF, 0x51, 0x00}; /* We only need this because of how the presets are set */ /* this typedef is copied from 'openjpeg-1.5.0/applications/codec/image_to_j2k.c' */ -typedef struct img_folder { +struct img_fol_t { /** The directory path of the folder containing input images. */ char *imgdirpath; /** Output format. */ @@ -39,7 +39,7 @@ typedef struct img_folder { char set_out_format; /** User specified rate stored in case of cinema option. */ float *rates; -} img_fol_t; +}; static bool check_jp2(const uchar *mem, const size_t size) /* J2K_CFMT */ { diff --git a/source/blender/imbuf/intern/jpeg.cc b/source/blender/imbuf/intern/jpeg.cc index b9ac040ec2b..1f1092394e4 100644 --- a/source/blender/imbuf/intern/jpeg.cc +++ b/source/blender/imbuf/intern/jpeg.cc @@ -60,11 +60,11 @@ bool imb_is_a_jpeg(const uchar *mem, const size_t size) * JPG ERROR HANDLING *---------------------------------------------------------- */ -typedef struct my_error_mgr { +struct my_error_mgr { jpeg_error_mgr pub; /* "public" fields */ jmp_buf setjmp_buffer; /* for return to caller */ -} my_error_mgr; +}; typedef my_error_mgr *my_error_ptr; diff --git a/source/blender/imbuf/intern/rectop.cc b/source/blender/imbuf/intern/rectop.cc index 3425e859f41..726b97d787f 100644 --- a/source/blender/imbuf/intern/rectop.cc +++ b/source/blender/imbuf/intern/rectop.cc @@ -956,7 +956,7 @@ void IMB_rectblend(ImBuf *dbuf, } } -typedef struct RectBlendThreadData { +struct RectBlendThreadData { ImBuf *dbuf; const ImBuf *obuf, *sbuf; ushort *dmask; @@ -966,7 +966,7 @@ typedef struct RectBlendThreadData { int srcx, srcy, width; IMB_BlendMode mode; bool accumulate; -} RectBlendThreadData; +}; static void rectblend_thread_do(void *data_v, int scanline) { diff --git a/source/blender/imbuf/intern/scaling.cc b/source/blender/imbuf/intern/scaling.cc index 27d26c04b18..ec5d81ff341 100644 --- a/source/blender/imbuf/intern/scaling.cc +++ b/source/blender/imbuf/intern/scaling.cc @@ -1773,7 +1773,7 @@ bool IMB_scalefastImBuf(ImBuf *ibuf, uint newx, uint newy) /* ******** threaded scaling ******** */ -typedef struct ScaleTreadInitData { +struct ScaleTreadInitData { ImBuf *ibuf; uint newx; @@ -1781,9 +1781,9 @@ typedef struct ScaleTreadInitData { uchar *byte_buffer; float *float_buffer; -} ScaleTreadInitData; +}; -typedef struct ScaleThreadData { +struct ScaleThreadData { ImBuf *ibuf; uint newx; @@ -1794,7 +1794,7 @@ typedef struct ScaleThreadData { uchar *byte_buffer; float *float_buffer; -} ScaleThreadData; +}; static void scale_thread_init(void *data_v, int start_line, int tot_line, void *init_data_v) { diff --git a/source/blender/imbuf/intern/stereoimbuf.cc b/source/blender/imbuf/intern/stereoimbuf.cc index c05611b8ab1..209acdf20e6 100644 --- a/source/blender/imbuf/intern/stereoimbuf.cc +++ b/source/blender/imbuf/intern/stereoimbuf.cc @@ -32,7 +32,7 @@ struct Stereo3DData; static void imb_stereo3d_write_doit(Stereo3DData *s3d_data, const Stereo3dFormat *s3d); static void imb_stereo3d_read_doit(Stereo3DData *s3d_data, const Stereo3dFormat *s3d); -typedef struct Stereo3DData { +struct Stereo3DData { struct { float *left, *right, *stereo; } rectf; @@ -41,7 +41,7 @@ typedef struct Stereo3DData { } rect; size_t x, y, channels; bool is_float; -} Stereo3DData; +}; /* -------------------------------------------------------------------- */ /** \name Local Functions diff --git a/source/blender/modifiers/intern/MOD_remesh.cc b/source/blender/modifiers/intern/MOD_remesh.cc index ef020407f1d..c44b4593682 100644 --- a/source/blender/modifiers/intern/MOD_remesh.cc +++ b/source/blender/modifiers/intern/MOD_remesh.cc @@ -78,13 +78,13 @@ static void init_dualcon_mesh(DualConInput *input, Mesh *mesh) /* simple structure to hold the output: a CDDM and two counters to * keep track of the current elements */ -typedef struct { +struct DualConOutput { Mesh *mesh; blender::float3 *vert_positions; int *poly_offsets; int *corner_verts; int curvert, curface; -} DualConOutput; +}; /* allocate and initialize a DualConOutput */ static void *dualcon_alloc_output(int totvert, int totquad) diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 5350d938e64..a612cd6fdbd 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -2714,10 +2714,10 @@ static void set_next_operator_state(wmOperator *op, int state) RNA_int_set(op->ptr, "state", state); } -typedef struct OperatorDispatchTarget { +struct OperatorDispatchTarget { int state; int (*run)(bContext *C, wmOperator *op); -} OperatorDispatchTarget; +}; static int operator_state_dispatch(bContext *C, wmOperator *op, OperatorDispatchTarget *targets) {