diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-04-03 08:21:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-04-03 08:21:24 +0300 |
commit | 600a627f6e326f4542a876e6e82f771cd3da218f (patch) | |
tree | 9df2dd448e8da7b885d8cf8e56645a062f6d842c /source/blender/editors/space_clip | |
parent | 04fe37f93116bd3b276ebe86d9fa53f18223ee6a (diff) |
Cleanup: use abbreviated names for unsigned types in editors
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_dopesheet_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 15 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 20 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_graph_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 12 |
5 files changed, 28 insertions, 29 deletions
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c index eba0f33d6cc..aef6781ec47 100644 --- a/source/blender/editors/space_clip/clip_dopesheet_draw.c +++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c @@ -68,7 +68,7 @@ static void track_channel_color(MovieTrackingTrack *track, float default_color[3 } static void draw_keyframe_shape( - float x, float y, bool sel, float alpha, unsigned int pos_id, unsigned int color_id) + float x, float y, bool sel, float alpha, uint pos_id, uint color_id) { float color[4] = {0.91f, 0.91f, 0.91f, alpha}; if (sel) { @@ -79,7 +79,7 @@ static void draw_keyframe_shape( immVertex2f(pos_id, x, y); } -static void clip_draw_dopesheet_background(ARegion *region, MovieClip *clip, unsigned int pos_id) +static void clip_draw_dopesheet_background(ARegion *region, MovieClip *clip, uint pos_id) { View2D *v2d = ®ion->v2d; MovieTracking *tracking = &clip->tracking; diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 2a6cf4d5a55..a1652ca0e88 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -66,8 +66,7 @@ /*********************** main area drawing *************************/ -static void draw_keyframe( - int frame, int cfra, int sfra, float framelen, int width, unsigned int pos) +static void draw_keyframe(int frame, int cfra, int sfra, float framelen, int width, uint pos) { int height = (frame == cfra) ? 22 : 10; int x = (frame - sfra) * framelen; @@ -592,7 +591,7 @@ static void draw_marker_outline(SpaceClip *sc, const float marker_pos[2], int width, int height, - unsigned int position) + uint position) { int tiny = sc->flag & SC_SHOW_TINY_MARKER; bool show_search = false; @@ -895,7 +894,7 @@ static float get_shortest_pattern_side(MovieTrackingMarker *marker) } static void draw_marker_slide_square( - float x, float y, float dx, float dy, int outline, const float px[2], unsigned int pos) + float x, float y, float dx, float dy, int outline, const float px[2], uint pos) { float tdx, tdy; @@ -911,7 +910,7 @@ static void draw_marker_slide_square( } static void draw_marker_slide_triangle( - float x, float y, float dx, float dy, int outline, const float px[2], unsigned int pos) + float x, float y, float dx, float dy, int outline, const float px[2], uint pos) { float tdx, tdy; @@ -939,7 +938,7 @@ static void draw_marker_slide_zones(SpaceClip *sc, int act, int width, int height, - unsigned int pos) + uint pos) { float dx, dy, patdx, patdy, searchdx, searchdy; int tiny = sc->flag & SC_SHOW_TINY_MARKER; @@ -1056,7 +1055,7 @@ static void draw_marker_texts(SpaceClip *sc, UI_FontThemeColor(fontid, TH_ACT_MARKER); } else { - unsigned char color[4]; + uchar color[4]; UI_GetThemeColorShade4ubv(TH_DIS_MARKER, 128, color); BLF_color4ubv(fontid, color); } @@ -1191,7 +1190,7 @@ static void draw_plane_marker_image(Scene *scene, ibuf = BKE_image_acquire_ibuf(image, NULL, &lock); if (ibuf) { - unsigned char *display_buffer; + uchar *display_buffer; void *cache_handle; if (image->flag & IMA_VIEW_AS_RENDER) { diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 6336f1bff3a..62d4a6ae4f0 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -282,7 +282,7 @@ bool ED_space_clip_color_sample(SpaceClip *sc, ARegion *region, int mval[2], flo if (fx >= 0.0f && fy >= 0.0f && fx < 1.0f && fy < 1.0f) { const float *fp; - unsigned char *cp; + uchar *cp; int x = (int)(fx * ibuf->x), y = (int)(fy * ibuf->y); CLAMP(x, 0, ibuf->x - 1); @@ -294,7 +294,7 @@ bool ED_space_clip_color_sample(SpaceClip *sc, ARegion *region, int mval[2], flo ret = true; } else if (ibuf->rect) { - cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x); + cp = (uchar *)(ibuf->rect + y * ibuf->x + x); rgb_uchar_to_float(r_col, cp); IMB_colormanagement_colorspace_to_scene_linear_v3(r_col, ibuf->rect_colorspace); ret = true; @@ -744,7 +744,7 @@ static bool check_prefetch_break(void) } /* read file for specified frame number to the memory */ -static unsigned char *prefetch_read_file_to_memory( +static uchar *prefetch_read_file_to_memory( MovieClip *clip, int current_frame, short render_size, short render_flag, size_t *r_size) { MovieClipUser user = {0}; @@ -766,7 +766,7 @@ static unsigned char *prefetch_read_file_to_memory( return NULL; } - unsigned char *mem = MEM_mallocN(size, "movieclip prefetch memory file"); + uchar *mem = MEM_mallocN(size, "movieclip prefetch memory file"); if (mem == NULL) { close(file); return NULL; @@ -822,12 +822,12 @@ static int prefetch_find_uncached_frame(MovieClip *clip, } /* get memory buffer for first uncached frame within prefetch frame range */ -static unsigned char *prefetch_thread_next_frame(PrefetchQueue *queue, - MovieClip *clip, - size_t *r_size, - int *r_current_frame) +static uchar *prefetch_thread_next_frame(PrefetchQueue *queue, + MovieClip *clip, + size_t *r_size, + int *r_current_frame) { - unsigned char *mem = NULL; + uchar *mem = NULL; BLI_spin_lock(&queue->spin); if (!*queue->stop && !check_prefetch_break() && @@ -888,7 +888,7 @@ static void prefetch_task_func(TaskPool *__restrict pool, void *task_data, int U { PrefetchQueue *queue = (PrefetchQueue *)BLI_task_pool_userdata(pool); MovieClip *clip = (MovieClip *)task_data; - unsigned char *mem; + uchar *mem; size_t size; int current_frame; diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c index 7f3d3f3d651..dc212741e6b 100644 --- a/source/blender/editors/space_clip/clip_graph_draw.c +++ b/source/blender/editors/space_clip/clip_graph_draw.c @@ -52,7 +52,7 @@ typedef struct TrackMotionCurveUserData { MovieTrackingTrack *act_track; bool sel; float xscale, yscale, hsize; - unsigned int pos; + uint pos; } TrackMotionCurveUserData; static void tracking_segment_point_cb(void *userdata, @@ -159,7 +159,7 @@ static void tracking_segment_knot_cb(void *userdata, } } -static void draw_tracks_motion_and_error_curves(View2D *v2d, SpaceClip *sc, unsigned int pos) +static void draw_tracks_motion_and_error_curves(View2D *v2d, SpaceClip *sc, uint pos) { MovieClip *clip = ED_space_clip_get_clip(sc); MovieTracking *tracking = &clip->tracking; @@ -215,7 +215,7 @@ static void draw_tracks_motion_and_error_curves(View2D *v2d, SpaceClip *sc, unsi } } -static void draw_frame_curves(SpaceClip *sc, unsigned int pos) +static void draw_frame_curves(SpaceClip *sc, uint pos) { MovieClip *clip = ED_space_clip_get_clip(sc); MovieTracking *tracking = &clip->tracking; diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 4e5c6513695..79050fb4797 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1313,12 +1313,12 @@ typedef struct ProxyThread { int *build_undistort_sizes, build_undistort_count; } ProxyThread; -static unsigned char *proxy_thread_next_frame(ProxyQueue *queue, - MovieClip *clip, - size_t *r_size, - int *r_cfra) +static uchar *proxy_thread_next_frame(ProxyQueue *queue, + MovieClip *clip, + size_t *r_size, + int *r_cfra) { - unsigned char *mem = NULL; + uchar *mem = NULL; BLI_spin_lock(&queue->spin); if (!*queue->stop && queue->cfra <= queue->efra) { @@ -1371,7 +1371,7 @@ static void proxy_task_func(TaskPool *__restrict pool, void *task_data, int UNUS { ProxyThread *data = (ProxyThread *)task_data; ProxyQueue *queue = (ProxyQueue *)BLI_task_pool_userdata(pool); - unsigned char *mem; + uchar *mem; size_t size; int cfra; |