]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/layout/SubtableProcessor2.cpp
ICU-531.48.tar.gz
[apple/icu.git] / icuSources / layout / SubtableProcessor2.cpp
index 2c0e97b8dd87a44d6b7b4c9e7b9738dc5f702c37..7b478602c703404f1ed29eaed88d192a87a59682 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp.  and others 1998-2014 - All Rights Reserved
  *
  */
 
@@ -15,13 +15,14 @@ SubtableProcessor2::SubtableProcessor2()
 {
 }
 
-SubtableProcessor2::SubtableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader)
+SubtableProcessor2::SubtableProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : length(0), coverage(0), subtableFeatures(0L), subtableHeader(morphSubtableHeader, success)
 {
-    subtableHeader = morphSubtableHeader;
-    
-    length = SWAPL(subtableHeader->length);
-    coverage = SWAPL(subtableHeader->coverage);
-    subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
+  if(LE_FAILURE(success)) return;
+
+  length = SWAPL(subtableHeader->length);
+  coverage = SWAPL(subtableHeader->coverage);
+  subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
 }
 
 SubtableProcessor2::~SubtableProcessor2()