updated licenses info
[platform/core/uifw/lottie-player.git] / src / vector / vdasher.cpp
index eedae3a..cc4a8b8 100644 (file)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the LGPL License, Version 2.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.gnu.org/licenses/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "vdasher.h"
 #include "vbezier.h"
 #include "vline.h"
@@ -6,11 +22,10 @@ V_BEGIN_NAMESPACE
 
 VDasher::VDasher(const float *dashArray, int size)
 {
-    if (!(size % 2)) vCritical << "invalid dashArray format";
-
     mDashArray = reinterpret_cast<const VDasher::Dash *>(dashArray);
     mArraySize = size / 2;
-    mDashOffset = dashArray[size - 1];
+    if (size % 2)
+        mDashOffset = dashArray[size - 1];
     mIndex = 0;
     mCurrentLength = 0;
     mDiscard = false;
@@ -160,7 +175,7 @@ void VDasher::cubicTo(const VPointF &cp1, const VPointF &cp2, const VPointF &e)
 
 VPath VDasher::dashed(const VPath &path)
 {
-    if (path.isEmpty()) return VPath();
+    if (path.empty()) return VPath();
 
     mResult = VPath();
     mIndex = 0;