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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-21 14:44:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-21 14:44:10 +0400
commit6a2018fe13ad35537f8758f005b0cb3dc3bb0997 (patch)
tree61f2b0212af741ef997752b8e3e7ff22d684f5ea
parent08417318cd37b3f20c67b6062e604735a12b1179 (diff)
code cleanup: minor changes to last commit.
-rw-r--r--source/blender/blenkernel/BKE_packedFile.h2
-rw-r--r--source/blender/blenkernel/intern/font.c13
-rw-r--r--source/blender/blenkernel/intern/packedFile.c2
3 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h
index ecbd2e7536b..603cb1f22a6 100644
--- a/source/blender/blenkernel/BKE_packedFile.h
+++ b/source/blender/blenkernel/BKE_packedFile.h
@@ -43,7 +43,7 @@ struct ReportList;
struct VFont;
/* pack */
-struct PackedFile *dupPackedFileMemory(const struct PackedFile *pf_src);
+struct PackedFile *dupPackedFile(const struct PackedFile *pf_src);
struct PackedFile *newPackedFile(struct ReportList *reports, const char *filename, const char *relabase);
struct PackedFile *newPackedFileMemory(void *mem, int memlen);
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 8689d6648a9..0ffd68c9079 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -60,7 +60,6 @@
#include "BKE_curve.h"
#include "BKE_displist.h"
-//static ListBase ttfdata = {NULL, NULL};
/* The vfont code */
void BKE_vfont_free_data(struct VFont *vfont)
@@ -149,7 +148,7 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
/* We need to copy a tmp font to memory unless it is already there */
if (vfont->temp_pf == NULL) {
- vfont->temp_pf = dupPackedFileMemory(pf);
+ vfont->temp_pf = dupPackedFile(pf);
}
}
else {
@@ -237,8 +236,6 @@ VFont *BKE_vfont_load(Main *bmain, const char *name)
if (!vfont || vfont->packedfile != pf) {
freePackedFile(pf);
}
-
- //XXX waitcursor(0);
}
return vfont;
@@ -248,13 +245,13 @@ static VFont *which_vfont(Curve *cu, CharInfo *info)
{
switch (info->flag & (CU_CHINFO_BOLD | CU_CHINFO_ITALIC)) {
case CU_CHINFO_BOLD:
- if (cu->vfontb) return(cu->vfontb); else return(cu->vfont);
+ return cu->vfontb ? cu->vfontb : cu->vfont;
case CU_CHINFO_ITALIC:
- if (cu->vfonti) return(cu->vfonti); else return(cu->vfont);
+ return cu->vfonti ? cu->vfonti : cu->vfont;
case (CU_CHINFO_BOLD | CU_CHINFO_ITALIC):
- if (cu->vfontbi) return(cu->vfontbi); else return(cu->vfont);
+ return cu->vfontbi ? cu->vfontbi : cu->vfont;
default:
- return(cu->vfont);
+ return cu->vfont;
}
}
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index ed2f4af0c51..9787a5025f7 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -159,7 +159,7 @@ void freePackedFile(PackedFile *pf)
printf("freePackedFile: Trying to free a NULL pointer\n");
}
-PackedFile *dupPackedFileMemory(const PackedFile *pf_src)
+PackedFile *dupPackedFile(const PackedFile *pf_src)
{
PackedFile *pf_dst;