diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-24 05:56:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-24 05:56:23 +0300 |
commit | 0097997911b8ed428e65f3fc7e46464575e71160 (patch) | |
tree | e4356d62a044d00dbfae369ad439d605753c0882 /source/blender/editors/interface/interface_utils.c | |
parent | 490616d5bdf653a7ad39917067f64e53518c203d (diff) |
no functional changes.
- remove unneeded casts to (char*) in interface code.
- replace strcmp(.., "") with checks on the first char of the string.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r-- | source/blender/editors/interface/interface_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 9a6a54bb8ef..842dc40a39f 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -82,7 +82,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind but= uiDefButR(block, NUM, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); break; case PROP_ENUM: - if(icon && name && strcmp(name, "") == 0) + if(icon && name && name[0] == '\0') but= uiDefIconButR(block, MENU, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); else if(icon) but= uiDefIconTextButR(block, MENU, 0, icon, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); @@ -90,7 +90,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind but= uiDefButR(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); break; case PROP_STRING: - if(icon && name && strcmp(name, "") == 0) + if(icon && name && name[0] == '\0') but= uiDefIconButR(block, TEX, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); else if(icon) but= uiDefIconTextButR(block, TEX, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); |