From 14c797df16e4b809f813f739f674967e4beeba63 Mon Sep 17 00:00:00 2001 From: Ryusei Yamaguchi Date: Sun, 13 Jul 2014 18:25:09 +0900 Subject: [PATCH] remove extra returns and conditional compilation --- unifill/Utf16.hx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unifill/Utf16.hx b/unifill/Utf16.hx index 25d53fe..dcffb6f 100644 --- a/unifill/Utf16.hx +++ b/unifill/Utf16.hx @@ -7,7 +7,7 @@ class Utf16 implements Utf { **/ public static inline function fromCodePoint(codePoint : Int) : Utf16 { var buf = new StringU16Buffer(); - Utf16Impl.encode_code_point(function (x) return buf.addUnit(x), codePoint); + Utf16Impl.encode_code_point(function (x) buf.addUnit(x), codePoint); return new Utf16(buf.getStringU16()); } @@ -17,7 +17,7 @@ class Utf16 implements Utf { public static inline function fromCodePoints(codePoints : Iterable) : Utf16 { var buf = new StringU16Buffer(); for (c in codePoints) { - Utf16Impl.encode_code_point(function (x) return buf.addUnit(x), c); + Utf16Impl.encode_code_point(function (x) buf.addUnit(x), c); } return new Utf16(buf.getStringU16()); } @@ -277,7 +277,7 @@ private abstract StringU16Buffer(Array) { this = []; } - public #if !cpp inline #end function addUnit(unit : Int) : Void { + public inline function addUnit(unit : Int) : Void { this.push(unit); } @@ -291,7 +291,7 @@ private abstract StringU16(Array) { public static function fromString(s : String) : StringU16 { var buf = new StringU16Buffer(); - var addUnit = function (x) return buf.addUnit(x); + var addUnit = function (x) buf.addUnit(x); for (i in new InternalEncodingIter(s, 0, s.length)) { var c = InternalEncoding.codePointAt(s, i); Utf16Impl.encode_code_point(addUnit, c);