[Swift-commit] r5926 - trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Sat Sep 15 03:49:26 CDT 2012


Author: hategan
Date: 2012-09-15 03:49:25 -0500 (Sat, 15 Sep 2012)
New Revision: 5926

Modified:
   trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java
Log:
use constants instead of magic values

Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java	2012-09-15 08:40:23 UTC (rev 5925)
+++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java	2012-09-15 08:49:25 UTC (rev 5926)
@@ -54,8 +54,8 @@
 	}
 
 	private int attrs() {
-		return (fgColor << 16) + (bgColor << 20) + (underline ? 0x01000000 : 0x00000000)
-				+ (bold ? 0x02000000 : 0x00000000) + (lineArt ? 0x04000000 : 0x00000000);
+		return (fgColor << 16) + (bgColor << 20) + (underline ? ATTR_MASK_UNDERLINE : 0)
+				+ (bold ? ATTR_MASK_BOLD : 0) + (lineArt ? ATTR_MASK_LINE_ART : 0);
 	}
 
 	public void moveTo(int x, int y) {




More information about the Swift-commit mailing list