[Bf-blender-cvs] [b45a3e87470] master: Cleanup: remove dead code in vfont_to_curve
Campbell Barton
noreply at git.blender.org
Thu Feb 24 03:14:47 CET 2022
Commit: b45a3e8747018a173afba8ca0d25c898fb6e62bc
Author: Campbell Barton
Date: Thu Feb 24 13:13:06 2022 +1100
Branches: master
https://developer.blender.org/rBb45a3e8747018a173afba8ca0d25c898fb6e62bc
Cleanup: remove dead code in vfont_to_curve
Also replaces numbers with character literals for tab/space.
===================================================================
M source/blender/blenkernel/intern/vfont.c
===================================================================
diff --git a/source/blender/blenkernel/intern/vfont.c b/source/blender/blenkernel/intern/vfont.c
index 3af09f22fa9..40d3b5cf062 100644
--- a/source/blender/blenkernel/intern/vfont.c
+++ b/source/blender/blenkernel/intern/vfont.c
@@ -1072,22 +1072,12 @@ static bool vfont_to_curve(Object *ob,
current_line_length = 0.0f;
}
- /* XXX(campbell): has been unused for years, need to check if this is useful, r4613 r5282. */
-#if 0
- if (ascii == '\n') {
- xof = xof_scale;
- }
- else {
- xof = MARGIN_X_MIN;
- }
-#else
xof = MARGIN_X_MIN;
-#endif
lnr++;
cnr = 0;
wsnr = 0;
}
- else if (ascii == 9) { /* TAB */
+ else if (ascii == '\t') { /* Tab character. */
float tabfac;
ct->xof = xof;
@@ -1115,7 +1105,7 @@ static bool vfont_to_curve(Object *ob,
sb->w = xof * font_size;
}
- if (ascii == 32) {
+ if (ascii == ' ') { /* Space character. */
wsfac = cu->wordspace;
wsnr++;
}
More information about the Bf-blender-cvs
mailing list