add checks to style checker script for 'a . b' and 'a []'
also use BLI_findindex for modifiers_indexInObject
This commit is contained in:
@@ -623,12 +623,7 @@ int modifiers_isPreview(Object *ob)
|
||||
|
||||
int modifiers_indexInObject(Object *ob, ModifierData *md_seek)
|
||||
{
|
||||
int i = 0;
|
||||
ModifierData *md;
|
||||
|
||||
for (md = ob->modifiers.first; (md && md_seek != md); md = md->next, i++) ;
|
||||
if (!md) return -1; /* modifier isn't in the object */
|
||||
return i;
|
||||
return BLI_findindex(&ob->modifiers, md_seek);
|
||||
}
|
||||
|
||||
void modifier_freeTemporaryData(ModifierData *md)
|
||||
|
||||
@@ -41,7 +41,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
void BLI_insertlink(struct ListBase *listbase, void *vprevlink, void *vnewlink);
|
||||
int BLI_findindex(const struct ListBase *listbase, void *vlink);
|
||||
int BLI_findindex(const struct ListBase *listbase, const void *vlink);
|
||||
int BLI_findstringindex(const struct ListBase *listbase, const char *id, const int offset);
|
||||
|
||||
/* find forwards */
|
||||
@@ -79,4 +79,4 @@ struct LinkData *BLI_genericNodeN(void *data);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* __BLI_LISTBASE_H__ */
|
||||
|
||||
@@ -345,7 +345,7 @@ void *BLI_rfindlink(const ListBase *listbase, int number)
|
||||
return link;
|
||||
}
|
||||
|
||||
int BLI_findindex(const ListBase *listbase, void *vlink)
|
||||
int BLI_findindex(const ListBase *listbase, const void *vlink)
|
||||
{
|
||||
Link *link = NULL;
|
||||
int number = 0;
|
||||
|
||||
@@ -272,7 +272,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn)
|
||||
static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
|
||||
{
|
||||
struct RecentFile *recent;
|
||||
char file [FILE_MAX];
|
||||
char file[FILE_MAX];
|
||||
uiLayout *layout = menu->layout;
|
||||
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_REGION_WIN);
|
||||
if (G.recent_files.first) {
|
||||
|
||||
@@ -51,7 +51,7 @@ int uvedit_face_visible_nolocal(struct Scene *scene, struct BMFace *efa);
|
||||
|
||||
/* geometric utilities */
|
||||
float uv_poly_area(float uv[][2], int len);
|
||||
void uv_poly_copy_aspect(float uv_orig [][2], float uv[][2], float aspx, float aspy, int len);
|
||||
void uv_poly_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy, int len);
|
||||
void uv_poly_center(struct BMEditMesh *em, struct BMFace *f, float r_cent[2]);
|
||||
|
||||
/* find nearest */
|
||||
|
||||
@@ -1430,7 +1430,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
|
||||
int i;
|
||||
MenuType *mt = WM_menutype_find("USERPREF_MT_splash", TRUE);
|
||||
char url[96];
|
||||
char file [FILE_MAX];
|
||||
char file[FILE_MAX];
|
||||
|
||||
#ifndef WITH_HEADLESS
|
||||
extern char datatoc_splash_png[];
|
||||
|
||||
Reference in New Issue
Block a user