diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 10:04:52 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 11:26:27 +0300 |
commit | 891949cbb47143420f4324cb60efc05ef5d70b39 (patch) | |
tree | fe70a45612ae96f9ce1f37378ef5ff035d3127f5 /source/blender/blenlib/intern/scanfill.c | |
parent | c9e35c2ced92082c86f1ecb9ecd16c6230218c7c (diff) |
Cleanup: use 'u' prefixed integer types for brevity & cast style
To use function style cast '(unsigned char)x' can't be replaced by
'unsigned char(x)'.
Diffstat (limited to 'source/blender/blenlib/intern/scanfill.c')
-rw-r--r-- | source/blender/blenlib/intern/scanfill.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 33d387a5447..00ac1c0ecd7 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -33,9 +33,9 @@ /* local types */ typedef struct PolyFill { - unsigned int edges, verts; + uint edges, verts; float min_xy[2], max_xy[2]; - unsigned short nr; + ushort nr; bool f; } PolyFill; @@ -304,9 +304,7 @@ static bool addedgetoscanvert(ScanFillVertLink *sc, ScanFillEdge *eed) return true; } -static ScanFillVertLink *addedgetoscanlist(ScanFillVertLink *scdata, - ScanFillEdge *eed, - unsigned int len) +static ScanFillVertLink *addedgetoscanlist(ScanFillVertLink *scdata, ScanFillEdge *eed, uint len) { /* inserts edge at correct location in ScanFillVertLink list */ /* returns sc when edge already exists */ @@ -428,10 +426,7 @@ static void testvertexnearedge(ScanFillContext *sf_ctx) } } -static void splitlist(ScanFillContext *sf_ctx, - ListBase *tempve, - ListBase *temped, - unsigned short nr) +static void splitlist(ScanFillContext *sf_ctx, ListBase *tempve, ListBase *temped, ushort nr) { /* Everything is in temp-list, write only poly nr to fill-list. */ ScanFillVert *eve, *eve_next; @@ -457,14 +452,14 @@ static void splitlist(ScanFillContext *sf_ctx, } } -static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag) +static uint scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag) { ScanFillVertLink *scdata; ScanFillVertLink *sc = NULL, *sc1; ScanFillVert *eve, *v1, *v2, *v3; ScanFillEdge *eed, *eed_next, *ed1, *ed2, *ed3; - unsigned int a, b, verts, maxface, totface; - const unsigned short nr = pf->nr; + uint a, b, verts, maxface, totface; + const ushort nr = pf->nr; bool twoconnected = false; /* PRINTS */ |