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/08/08 21:15:58 UTC
[22/50] git commit: [flex-asjs] [refs/heads/feature/strand-work] - -
Fix failing Maven build of TLF module by adding CONFIG::debug and
CONFIG:release to defines - Surround assert function by curly brackets in TLF
debug package
- Fix failing Maven build of TLF module by adding CONFIG::debug and CONFIG:release to defines
- Surround assert function by curly brackets in TLF debug package
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b52122d9
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b52122d9
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b52122d9
Branch: refs/heads/feature/strand-work
Commit: b52122d95e925da051ad889e18681b830acbc802
Parents: 8ce67e2
Author: piotrz <pi...@apache.org>
Authored: Tue Aug 1 23:29:05 2017 +0200
Committer: piotrz <pi...@apache.org>
Committed: Tue Aug 1 23:29:05 2017 +0200
----------------------------------------------------------------------
frameworks/projects/TLF/pom.xml | 10 +++++
.../org/apache/flex/textLayout/debug/assert.as | 43 ++++++++++----------
2 files changed, 32 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b52122d9/frameworks/projects/TLF/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/pom.xml b/frameworks/projects/TLF/pom.xml
index 1b7aac0..a052743 100644
--- a/frameworks/projects/TLF/pom.xml
+++ b/frameworks/projects/TLF/pom.xml
@@ -63,6 +63,16 @@
</includeFiles>
<allowSubclassOverrides>true</allowSubclassOverrides>
<skipExtern>true</skipExtern>
+ <defines>
+ <define>
+ <name>CONFIG::debug</name>
+ <value>false</value>
+ </define>
+ <define>
+ <name>CONFIG::release</name>
+ <value>true</value>
+ </define>
+ </defines>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b52122d9/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/debug/assert.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/debug/assert.as b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/debug/assert.as
index 62ec778..09b6edf 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/debug/assert.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/debug/assert.as
@@ -16,32 +16,33 @@
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.textLayout.debug
+package org.apache.flex.textLayout.debug
{
-
-
-
-
/** @private
* Debug only function that prints a trace message if condition is false.
* @return count of errors reported this assert: 1 or 0.
* */
CONFIG::debug
- public function assert(condition:Boolean, warning:String):int
- {
- if (!condition)
- {
- trace("ERROR: " + warning);
- // throw if the bit is set
- if (Debugging.throwOnAssert)
- throw(new Error("TextLayoutAssert: " + warning));
- return 1;
- }
- return 0;
- }
+ {
+ public function assert(condition:Boolean, warning:String):int
+ {
+ if (!condition)
+ {
+ trace("ERROR: " + warning);
+ // throw if the bit is set
+ if (Debugging.throwOnAssert)
+ throw(new Error("TextLayoutAssert: " + warning));
+ return 1;
+ }
+ return 0;
+ }
+ }
+
/** @private */
- CONFIG::release
- public function assert(condition:Boolean, warning:String):void
- {
- }
+ CONFIG::release
+ {
+ public function assert(condition:Boolean, warning:String):void
+ {
+ }
+ }
} // end package