forked from bartvdbraak/blender
Code Cleanup: remove unused members for editfont (3D text)
This commit is contained in:
parent
31a1bcfcd7
commit
0af52adac0
@ -63,8 +63,6 @@ typedef struct EditFont {
|
||||
|
||||
wchar_t *textbuf;
|
||||
struct CharInfo *textbufinfo;
|
||||
wchar_t *oldstr;
|
||||
struct CharInfo *oldstrinfo;
|
||||
|
||||
float textcurs[4][2];
|
||||
|
||||
|
@ -104,10 +104,6 @@ void BKE_curve_editfont_free(Curve *cu)
|
||||
if (cu->editfont) {
|
||||
EditFont *ef = cu->editfont;
|
||||
|
||||
if (ef->oldstr)
|
||||
MEM_freeN(ef->oldstr);
|
||||
if (ef->oldstrinfo)
|
||||
MEM_freeN(ef->oldstrinfo);
|
||||
if (ef->textbuf)
|
||||
MEM_freeN(ef->textbuf);
|
||||
if (ef->textbufinfo)
|
||||
|
@ -1442,18 +1442,14 @@ void make_editText(Object *obedit)
|
||||
ef->textbufinfo = MEM_callocN((MAXTEXT + 4) * sizeof(CharInfo), "texteditbufinfo");
|
||||
ef->copybuf = MEM_callocN((MAXTEXT + 4) * sizeof(wchar_t), "texteditcopybuf");
|
||||
ef->copybufinfo = MEM_callocN((MAXTEXT + 4) * sizeof(CharInfo), "texteditcopybufinfo");
|
||||
ef->oldstr = MEM_callocN((MAXTEXT + 4) * sizeof(wchar_t), "oldstrbuf");
|
||||
ef->oldstrinfo = MEM_callocN((MAXTEXT + 4) * sizeof(CharInfo), "oldstrbuf");
|
||||
}
|
||||
|
||||
/* Convert the original text to wchar_t */
|
||||
BLI_strncpy_wchar_from_utf8(ef->textbuf, cu->str, MAXTEXT + 4); /* length is bogus */
|
||||
wcscpy(ef->oldstr, ef->textbuf);
|
||||
|
||||
cu->len = wcslen(ef->textbuf);
|
||||
|
||||
memcpy(ef->textbufinfo, cu->strinfo, (cu->len) * sizeof(CharInfo));
|
||||
memcpy(ef->oldstrinfo, cu->strinfo, (cu->len) * sizeof(CharInfo));
|
||||
|
||||
if (cu->pos > cu->len) cu->pos = cu->len;
|
||||
|
||||
@ -1471,11 +1467,6 @@ void load_editText(Object *obedit)
|
||||
Curve *cu = obedit->data;
|
||||
EditFont *ef = cu->editfont;
|
||||
|
||||
MEM_freeN(ef->oldstr);
|
||||
ef->oldstr = NULL;
|
||||
MEM_freeN(ef->oldstrinfo);
|
||||
ef->oldstrinfo = NULL;
|
||||
|
||||
update_string(cu);
|
||||
|
||||
if (cu->strinfo)
|
||||
|
Loading…
Reference in New Issue
Block a user