Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-04-13 08:28:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-13 08:28:04 +0400
commit2c4724495494868c88b0a97aaa25b70cb2f88eb2 (patch)
tree12155289ae2d7d17febcab617ede040ed8f0ecaa /source
parent2f9b7410dc712961f5684e4892660167c693cda8 (diff)
code cleanup: use `const char` for args and replace wm_keyconfig_list_find() -> BLI_findstring()
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h2
-rw-r--r--source/blender/blenkernel/intern/seqmodifier.c2
-rw-r--r--source/blender/editors/armature/armature_add.c2
-rw-r--r--source/blender/editors/armature/armature_naming.c2
-rw-r--r--source/blender/editors/curve/editcurve.c3
-rw-r--r--source/blender/editors/object/object_vgroup.c4
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c13
7 files changed, 9 insertions, 19 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index 9586df6d119..a161a088589 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -409,7 +409,7 @@ int BKE_sequence_modifier_remove(struct Sequence *seq, struct SequenceModifierDa
void BKE_sequence_modifier_clear(struct Sequence *seq);
void BKE_sequence_modifier_free(struct SequenceModifierData *smd);
void BKE_sequence_modifier_unique_name(struct Sequence *seq, struct SequenceModifierData *smd);
-struct SequenceModifierData *BKE_sequence_modifier_find_by_name(struct Sequence *seq, char *name);
+struct SequenceModifierData *BKE_sequence_modifier_find_by_name(struct Sequence *seq, const char *name);
struct ImBuf *BKE_sequence_modifier_apply_stack(SeqRenderData context, struct Sequence *seq, struct ImBuf *ibuf, int cfra);
void BKE_sequence_modifier_list_copy(struct Sequence *seqn, struct Sequence *seq);
diff --git a/source/blender/blenkernel/intern/seqmodifier.c b/source/blender/blenkernel/intern/seqmodifier.c
index 595907ffb27..1787bd11298 100644
--- a/source/blender/blenkernel/intern/seqmodifier.c
+++ b/source/blender/blenkernel/intern/seqmodifier.c
@@ -578,7 +578,7 @@ void BKE_sequence_modifier_unique_name(Sequence *seq, SequenceModifierData *smd)
offsetof(SequenceModifierData, name), sizeof(smd->name));
}
-SequenceModifierData *BKE_sequence_modifier_find_by_name(Sequence *seq, char *name)
+SequenceModifierData *BKE_sequence_modifier_find_by_name(Sequence *seq, const char *name)
{
return BLI_findstring(&(seq->modifiers), name, offsetof(SequenceModifierData, name));
}
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index 28fb74f0cdd..13c1f2d5b2b 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -279,7 +279,7 @@ EditBone *add_points_bone(Object *obedit, float head[3], float tail[3])
}
-static EditBone *get_named_editbone(ListBase *edbo, char *name)
+static EditBone *get_named_editbone(ListBase *edbo, const char *name)
{
EditBone *eBone;
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 196b8064967..1ee2dc80a97 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -104,7 +104,7 @@ static void unique_bone_name(bArmature *arm, char *name)
}
/* helper call for armature_bone_rename */
-static void constraint_bone_name_fix(Object *ob, ListBase *conlist, char *oldname, char *newname)
+static void constraint_bone_name_fix(Object *ob, ListBase *conlist, const char *oldname, const char *newname)
{
bConstraint *curcon;
bConstraintTarget *ct;
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 314967d4426..953372bda42 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1028,7 +1028,8 @@ static int curve_is_animated(Curve *cu)
return ad && (ad->action || ad->drivers.first);
}
-static void fcurve_path_rename(AnimData *adt, char *orig_rna_path, char *rna_path, ListBase *orig_curves, ListBase *curves)
+static void fcurve_path_rename(AnimData *adt, const char *orig_rna_path, char *rna_path,
+ ListBase *orig_curves, ListBase *curves)
{
FCurve *fcu, *nfcu, *nextfcu;
int len = strlen(orig_rna_path);
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index a9fac006486..623e23588f0 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -3479,7 +3479,7 @@ static char *vgroup_init_remap(Object *ob)
return name_array;
}
-static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
+static int vgroup_do_remap(Object *ob, const char *name_array, wmOperator *op)
{
MDeformVert *dvert = NULL;
bDeformGroup *def;
@@ -3489,7 +3489,7 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
int *sort_map_update = MEM_mallocN(sizeof(int) * (defbase_tot + 1), "sort vgroups");
int *sort_map = sort_map_update + 1;
- char *name;
+ const char *name;
int i;
name = name_array;
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index f06bae1d084..d5b6d2cd0c8 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -220,23 +220,12 @@ void WM_keyconfig_free(wmKeyConfig *keyconf)
MEM_freeN(keyconf);
}
-static wmKeyConfig *wm_keyconfig_list_find(ListBase *lb, char *idname)
-{
- wmKeyConfig *kc;
-
- for (kc = lb->first; kc; kc = kc->next)
- if (0 == strncmp(idname, kc->idname, KMAP_MAX_NAME))
- return kc;
-
- return NULL;
-}
-
static wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm)
{
wmKeyConfig *keyconf;
/* first try from preset */
- keyconf = wm_keyconfig_list_find(&wm->keyconfigs, U.keyconfigstr);
+ keyconf = BLI_findstring(&wm->keyconfigs, U.keyconfigstr, offsetof(wmKeyConfig, idname));
if (keyconf)
return keyconf;