weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ky...@apache.org
Subject [39/52] [abbrv] incubator-weex git commit: * [core] open BUILD_TYPE=Release.
Date Mon, 07 May 2018 07:53:12 GMT
* [core] open BUILD_TYPE=Release.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/02e9a1cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/02e9a1cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/02e9a1cf

Branch: refs/heads/master
Commit: 02e9a1cf5bce2aa88698ef15bc9ab21f2bc25e1e
Parents: 3aeb640
Author: 驱影 <jike.yjk@alibaba-inc.com>
Authored: Mon May 7 11:55:15 2018 +0800
Committer: YorkShen <shenyuancs@gmail.com>
Committed: Mon May 7 15:52:09 2018 +0800

----------------------------------------------------------------------
 android/sdk/build.gradle                       |   3 +-
 android/sdk/libs/armeabi/libweexjsc.so         | Bin 0 -> 1748292 bytes
 weex_core/Source/core/css/css_value_getter.cpp |  68 +++++++++++---------
 weex_core/Source/core/css/css_value_getter.h   |  12 ++--
 4 files changed, 45 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/02e9a1cf/android/sdk/build.gradle
----------------------------------------------------------------------
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index 34bad9b..1b0480b 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -117,7 +117,8 @@ android {
             cmake {
                 arguments '-DANDROID_PLATFORM=android-19',
                         '-DANDROID_TOOLCHAIN=gcc',
-                        '-DANDROID_STL=c++_static'
+                        '-DANDROID_STL=c++_static',
+                        '-DCMAKE_BUILD_TYPE=Release'
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/02e9a1cf/android/sdk/libs/armeabi/libweexjsc.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjsc.so b/android/sdk/libs/armeabi/libweexjsc.so
new file mode 100644
index 0000000..fb1b9a6
Binary files /dev/null and b/android/sdk/libs/armeabi/libweexjsc.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/02e9a1cf/weex_core/Source/core/css/css_value_getter.cpp
----------------------------------------------------------------------
diff --git a/weex_core/Source/core/css/css_value_getter.cpp b/weex_core/Source/core/css/css_value_getter.cpp
index ff7cd6d..ea78c96 100644
--- a/weex_core/Source/core/css/css_value_getter.cpp
+++ b/weex_core/Source/core/css/css_value_getter.cpp
@@ -23,82 +23,88 @@
 
 namespace WeexCore {
 
-  const WXCoreFlexDirection &GetWXCoreFlexDirection(const std::string &value) {
-    if (value == COLUMN) {
+  const WXCoreFlexDirection GetWXCoreFlexDirection(const std::string &value) {
+    const char *c_value = value.c_str();
+    if(strcmp(c_value, COLUMN) == 0) {
       return WeexCore::kFlexDirectionColumn;
-    } else if (value == ROW) {
+    } else if (strcmp(c_value, ROW) == 0) {
       return WeexCore::kFlexDirectionRow;
-    } else if (value == COLUMN_REVERSE) {
+    } else if (strcmp(c_value, COLUMN_REVERSE) == 0) {
       return WeexCore::kFlexDirectionColumnReverse;
-    } else if (value == ROW_REVERSE) {
+    } else if (strcmp(c_value, ROW_REVERSE) == 0) {
       return WeexCore::kFlexDirectionRowReverse;
     }
     return WeexCore::kFlexDirectionColumn;
   }
 
-  const WXCoreJustifyContent &GetWXCoreJustifyContent(const std::string &value) {
-    if (value == FLEX_START) {
+  const WXCoreJustifyContent GetWXCoreJustifyContent(const std::string &value) {
+    const char *c_value = value.c_str();
+    if (strcmp(c_value, FLEX_START) == 0) {
       return WeexCore::kJustifyFlexStart;
-    } else if (value == FLEX_END) {
+    } else if (strcmp(c_value, FLEX_END) == 0) {
       return WeexCore::kJustifyFlexEnd;
-    } else if (value == CENTER) {
+    } else if (strcmp(c_value, CENTER) == 0) {
       return WeexCore::kJustifyCenter;
-    } else if (value == SPACE_BETWEEN) {
+    } else if (strcmp(c_value, SPACE_BETWEEN) == 0) {
       return WeexCore::kJustifySpaceBetween;
-    } else if (value == SPACE_AROUND) {
+    } else if (strcmp(c_value, SPACE_AROUND) == 0) {
       return WeexCore::kJustifySpaceAround;
     }
     return WeexCore::kJustifyFlexStart;
   }
 
-  const WXCoreAlignItems &GetWXCoreAlignItem(const std::string &value) {
-    if (value == STRETCH) {
+  const WXCoreAlignItems GetWXCoreAlignItem(const std::string &value) {
+    const char *c_value = value.c_str();
+    if (strcmp(c_value, STRETCH) == 0) {
       return WeexCore::kAlignItemsStretch;
-    } else if (value == FLEX_START) {
+    } else if (strcmp(c_value, FLEX_START) == 0) {
       return WeexCore::kAlignItemsFlexStart;
-    } else if (value == FLEX_END) {
+    } else if (strcmp(c_value, FLEX_END) == 0) {
       return WeexCore::kAlignItemsFlexEnd;
-    } else if (value == CENTER) {
+    } else if (strcmp(c_value, CENTER) == 0) {
       return WeexCore::kAlignItemsCenter;
     }
     return WeexCore::kAlignItemsStretch;
   }
 
-  const WXCoreFlexWrap &GetWXCoreFlexWrap(const std::string &value) {
-    if (value == NOWRAP) {
+  const WXCoreFlexWrap GetWXCoreFlexWrap(const std::string &value) {
+    const char *c_value = value.c_str();
+    if (strcmp(c_value, NOWRAP) == 0) {
       return WeexCore::kNoWrap;
-    } else if (value == WRAP) {
+    } else if (strcmp(c_value, WRAP) == 0) {
       return WeexCore::kWrap;
-    } else if (value == WRAP_REVERSE) {
+    } else if (strcmp(c_value, WRAP_REVERSE) == 0) {
       return WeexCore::kWrapReverse;
     }
     return WeexCore::kNoWrap;
   }
 
-  const WXCoreAlignSelf &GetWXCoreAlignSelf(const std::string &value) {
-    if (value == AUTO) {
+  const WXCoreAlignSelf GetWXCoreAlignSelf(const std::string &value) {
+    const char *c_value = value.c_str();
+    if (strcmp(c_value, AUTO) == 0) {
       return WeexCore::kAlignSelfAuto;
-    } else if (value == STRETCH) {
+    } else if (strcmp(c_value, STRETCH) == 0) {
       return WeexCore::kAlignSelfStretch;
-    } else if (value == FLEX_START) {
+    } else if (strcmp(c_value, FLEX_START) == 0) {
       return WeexCore::kAlignSelfFlexStart;
-    } else if (value == FLEX_END) {
+    } else if (strcmp(c_value, FLEX_END) == 0) {
       return WeexCore::kAlignSelfFlexEnd;
-    } else if (value == CENTER) {
+    } else if (strcmp(c_value, CENTER) == 0) {
       return WeexCore::kAlignSelfCenter;
     }
     return WeexCore::kAlignSelfAuto;
   }
 
-  const WXCorePositionType &GetWXCorePositionType(const std::string &value) {
+  const WXCorePositionType GetWXCorePositionType(const std::string &value) {
+    const char *c_value = value.c_str();
     auto ret = kRelative;
-    if (value == RELATIVE) {
+    if (strcmp(c_value, RELATIVE) == 0) {
       ret = kRelative;
-    } else if (value == ABSOLUTE) {
+    } else if (strcmp(c_value, ABSOLUTE) == 0) {
       ret = kAbsolute;
-    } else if(value == STICKY){
+    } else if(strcmp(c_value, STICKY) == 0){
       ret = kSticky;
-    }else if(value == FIXED){
+    }else if(strcmp(c_value, FIXED) == 0){
       ret = kFixed;
     }
     return ret;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/02e9a1cf/weex_core/Source/core/css/css_value_getter.h
----------------------------------------------------------------------
diff --git a/weex_core/Source/core/css/css_value_getter.h b/weex_core/Source/core/css/css_value_getter.h
index 6c9ae7d..f47abc1 100644
--- a/weex_core/Source/core/css/css_value_getter.h
+++ b/weex_core/Source/core/css/css_value_getter.h
@@ -24,17 +24,17 @@
 
 namespace WeexCore {
 
-  const WXCoreFlexDirection &GetWXCoreFlexDirection(const std::string &value);
+  const WXCoreFlexDirection GetWXCoreFlexDirection(const std::string &value);
 
-  const WXCoreJustifyContent &GetWXCoreJustifyContent(const std::string &value);
+  const WXCoreJustifyContent GetWXCoreJustifyContent(const std::string &value);
 
-  const WXCoreAlignItems &GetWXCoreAlignItem(const std::string &value);
+  const WXCoreAlignItems GetWXCoreAlignItem(const std::string &value);
 
-  const WXCoreFlexWrap &GetWXCoreFlexWrap(const std::string &value);
+  const WXCoreFlexWrap GetWXCoreFlexWrap(const std::string &value);
 
-  const WXCoreAlignSelf &GetWXCoreAlignSelf(const std::string &value);
+  const WXCoreAlignSelf GetWXCoreAlignSelf(const std::string &value);
 
-  const WXCorePositionType &GetWXCorePositionType(const std::string &value);
+  const WXCorePositionType GetWXCorePositionType(const std::string &value);
 }
 
 


Mime
View raw message