From 9821dd72bac89053ce0213e68116855910c681e9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 Aug 2019 17:28:48 +1000 Subject: Cleanup: rename natural string comparison --- source/blender/editors/object/object_vgroup.c | 2 +- source/blender/editors/space_file/filelist.c | 8 ++++---- source/blender/editors/space_node/node_templates.c | 2 +- source/blender/editors/space_outliner/outliner_tree.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 08fe5e818b2..ce385b12608 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -3794,7 +3794,7 @@ static int vgroup_sort_name(const void *def_a_ptr, const void *def_b_ptr) const bDeformGroup *def_a = def_a_ptr; const bDeformGroup *def_b = def_b_ptr; - return BLI_natstrcmp(def_a->name, def_b->name); + return BLI_strcasecmp_natural(def_a->name, def_b->name); } /** diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index f7dda1defe8..ee86a583974 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -434,7 +434,7 @@ static int compare_name(void *UNUSED(user_data), const void *a1, const void *a2) name1 = entry1->name; name2 = entry2->name; - return BLI_natstrcmp(name1, name2); + return BLI_strcasecmp_natural(name1, name2); } static int compare_date(void *UNUSED(user_data), const void *a1, const void *a2) @@ -461,7 +461,7 @@ static int compare_date(void *UNUSED(user_data), const void *a1, const void *a2) name1 = entry1->name; name2 = entry2->name; - return BLI_natstrcmp(name1, name2); + return BLI_strcasecmp_natural(name1, name2); } static int compare_size(void *UNUSED(user_data), const void *a1, const void *a2) @@ -488,7 +488,7 @@ static int compare_size(void *UNUSED(user_data), const void *a1, const void *a2) name1 = entry1->name; name2 = entry2->name; - return BLI_natstrcmp(name1, name2); + return BLI_strcasecmp_natural(name1, name2); } static int compare_extension(void *UNUSED(user_data), const void *a1, const void *a2) @@ -546,7 +546,7 @@ static int compare_extension(void *UNUSED(user_data), const void *a1, const void name1 = entry1->name; name2 = entry2->name; - return BLI_natstrcmp(name1, name2); + return BLI_strcasecmp_natural(name1, name2); } void filelist_sort(struct FileList *filelist) diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index 8cc57a82fe0..423dec13c69 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -441,7 +441,7 @@ static int ui_node_item_name_compare(const void *a, const void *b) { const bNodeType *type_a = *(const bNodeType **)a; const bNodeType *type_b = *(const bNodeType **)b; - return BLI_natstrcmp(type_a->ui_name, type_b->ui_name); + return BLI_strcasecmp_natural(type_a->ui_name, type_b->ui_name); } static bool ui_node_item_special_poll(const bNodeTree *UNUSED(ntree), const bNodeType *ntype) diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 41958656688..fd6a052b84d 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1627,7 +1627,7 @@ static int treesort_alpha_ob(const void *v1, const void *v2) return (x1->te->flag & TE_CHILD_NOT_IN_COLLECTION) ? 1 : -1; } - comp = BLI_natstrcmp(x1->name, x2->name); + comp = BLI_strcasecmp_natural(x1->name, x2->name); if (comp > 0) { return 1; @@ -1659,7 +1659,7 @@ static int treesort_alpha(const void *v1, const void *v2) const tTreeSort *x1 = v1, *x2 = v2; int comp; - comp = BLI_natstrcmp(x1->name, x2->name); + comp = BLI_strcasecmp_natural(x1->name, x2->name); if (comp > 0) { return 1; @@ -1697,7 +1697,7 @@ static int treesort_obtype_alpha(const void *v1, const void *v2) } } else { - int comp = BLI_natstrcmp(x1->name, x2->name); + int comp = BLI_strcasecmp_natural(x1->name, x2->name); if (comp > 0) { return 1; -- cgit v1.2.3