[Bf-blender-cvs] [ae87adc73a2] blender2.8: Font cleanup: use ELEM

Dalai Felinto noreply at git.blender.org
Thu Nov 1 01:46:03 CET 2018


Commit: ae87adc73a29efab1cde5c9df20e99f73ac501c9
Author: Dalai Felinto
Date:   Wed Oct 31 21:29:37 2018 -0300
Branches: blender2.8
https://developer.blender.org/rBae87adc73a29efab1cde5c9df20e99f73ac501c9

Font cleanup: use ELEM

===================================================================

M	source/blender/blenkernel/intern/font.c

===================================================================

diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 053a9b964a1..f6e1fabc6c0 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -1232,13 +1232,13 @@ makebreak:
 		}
 	}
 
-	if (mode == FO_CURSUP || mode == FO_CURSDOWN || mode == FO_PAGEUP || mode == FO_PAGEDOWN) {
+	if (ELEM(mode, FO_CURSUP, FO_CURSDOWN, FO_PAGEUP, FO_PAGEDOWN)) {
 		ct = &chartransdata[ef->pos];
 
-		if ((mode == FO_CURSUP || mode == FO_PAGEUP) && ct->linenr == 0) {
+		if (ELEM(mode, FO_CURSUP, FO_PAGEUP) && ct->linenr == 0) {
 			/* pass */
 		}
-		else if ((mode == FO_CURSDOWN || mode == FO_PAGEDOWN) && ct->linenr == lnr) {
+		else if (ELEM(mode, FO_CURSDOWN, FO_PAGEDOWN) && ct->linenr == lnr) {
 			/* pass */
 		}
 		else {



More information about the Bf-blender-cvs mailing list