You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2017/04/30 09:00:40 UTC

flex-asjs git commit: Not using “as” for null checking

Repository: flex-asjs
Updated Branches:
  refs/heads/tlf 4aee68b0b -> f64f89c9e


Not using \u201cas\u201d for null checking


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/f64f89c9
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f64f89c9
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f64f89c9

Branch: refs/heads/tlf
Commit: f64f89c9e745aa1df62225eccd6c83b6eebd30ee
Parents: 4aee68b
Author: Harbs <ha...@in-tools.com>
Authored: Sun Apr 30 12:00:35 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Apr 30 12:00:35 2017 +0300

----------------------------------------------------------------------
 .../org/apache/flex/textLayout/formats/TextLayoutFormat.as    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f64f89c9/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/formats/TextLayoutFormat.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/formats/TextLayoutFormat.as b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/formats/TextLayoutFormat.as
index 1e0f0ed..aa4e405 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/formats/TextLayoutFormat.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/formats/TextLayoutFormat.as
@@ -3677,12 +3677,11 @@ package org.apache.flex.textLayout.formats
 		/** @private */
 		public static function resetModifiedNoninheritedStyles(stylesObject:Object):void
 		{
-			var format:TextLayoutFormat = stylesObject as TextLayoutFormat;
-			if (format)
+			if (stylesObject is TextLayoutFormat)
 			{
 				// DO THIS possible optimization if (format.getStyles() == _emptyStyles) return;
-				format.writableStyles();
-				stylesObject = format.getStyles();
+				stylesObject.writableStyles();
+				stylesObject = stylesObject.getStyles();
 			}
 
 			if (stylesObject.columnBreakBefore != undefined && stylesObject.columnBreakBefore != TextLayoutFormat.columnBreakBeforeProperty.defaultValue)