diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-04 02:12:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-04 02:12:57 +0400 |
commit | 6972e19fd55470700618174bbba5893d53b1deaa (patch) | |
tree | 51f3fcbd3fa978e9053c9a0763f15232e08ff8ed /source/blender/editors/curve | |
parent | 84df85164d4d869d0830ea23467bcd0e1f127d48 (diff) |
code cleanup:
- replace (strcmp(vfont->name, FO_BUILTIN_NAME) == 0) with (BKE_vfont_is_builtin(vfont)).
- reduce some double promotions.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editfont.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index bb66b1f4347..eb9246db31e 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -1665,7 +1665,7 @@ static int font_open_exec(bContext *C, wmOperator *op) static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - VFont *font = NULL; + VFont *vfont = NULL; char *path; PointerRNA idptr; @@ -1678,10 +1678,10 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) if (pprop->prop) { idptr = RNA_property_pointer_get((PointerRNA *)pprop, pprop->prop); - font = idptr.id.data; + vfont = idptr.id.data; } - path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0) ? font->name : U.fontdir; + path = (vfont && !BKE_vfont_is_builtin(vfont)) ? vfont->name : U.fontdir; if (RNA_struct_property_is_set(op->ptr, "filepath")) return font_open_exec(C, op); |