diff dynamin/painting/text_layout.d @ 106:acdbb30fee7e

Port to D2. Most of the effort was dealing with immutable and const.
author Jordan Miner <jminer7@gmail.com>
date Mon, 17 Dec 2012 23:41:50 -0600
parents 97997a544ac0
children
line wrap: on
line diff
--- a/dynamin/painting/text_layout.d	Sat Nov 24 10:21:50 2012 -0600
+++ b/dynamin/painting/text_layout.d	Mon Dec 17 23:41:50 2012 -0600
@@ -638,7 +638,7 @@
 			return;
 		// NOTE: Do not use cropRight(). It is broken. It will cut off an ending code point even
 		// when it is a perfectly valid string. Thankfully, cropLeft() works.
-		if(cropLeft!(char)(text[index..$]).length != text.length-index)
+		if(cropLeft!(char)(cast(mstring)text[index..$]).length != text.length-index)
 			throw new Exception("index must be at a valid code point, not inside one");
 	}