Emscripten/llvm related issues 54/17154/1
authorLee Morgan <lee.morgan@partner.samsung.com>
Mon, 3 Mar 2014 12:57:20 +0000 (12:57 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Tue, 4 Mar 2014 10:31:42 +0000 (10:31 +0000)
[Issue] N/A
[Problem] Emscripten/llvm patch (f33bf99) highlighted issues
[Cause] N/A
[Solution] N/A

Signed-off-by: Paul Wisbey <p.wisbey@samsung.com>
Change-Id: I625e1cd852bf199b5bea261581c71ae4d0ff83e2

automated-tests/dali-test-suite/animation/utc-Dali-ActiveConstraint.cpp
automated-tests/dali-test-suite/type-registry/utc-Dali-TypeRegistry.cpp
dali/internal/event/common/type-info-impl.cpp
dali/internal/event/images/image-factory.h
dali/internal/event/modeling/animatable-mesh-impl.cpp
dali/internal/event/modeling/animatable-mesh-impl.h
dali/internal/event/text/font-factory.cpp
dali/internal/event/text/font-metrics.cpp
dali/internal/event/text/font-metrics.h
dali/public-api/geometry/animatable-mesh.cpp
dali/public-api/geometry/animatable-vertex.cpp

index ef32a48..facc341 100644 (file)
@@ -365,7 +365,7 @@ void UtcDaliConstraintProperties()
   }
   catch ( DaliException& e )
   {
-    DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "! \"Property index is invalid", TEST_LOCATION );
+    DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "! \"Cannot find property index", TEST_LOCATION );
   }
   DALI_TEST_EQUALS( active.GetPropertyIndex( "invalid-property-name"), Property::INVALID_INDEX, TEST_LOCATION );
   try
index 87553cb..16eea9f 100644 (file)
@@ -843,7 +843,7 @@ void UtcDaliPropertyRegistrationInvalidGetAndSet()
   }
   catch ( DaliException& e )
   {
-    DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "false && \"Property index not found", TEST_LOCATION );
+    DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "! \"Cannot find property index", TEST_LOCATION );
   }
 
   // Try to get an index that hasn't been added
@@ -854,6 +854,6 @@ void UtcDaliPropertyRegistrationInvalidGetAndSet()
   }
   catch ( DaliException& e )
   {
-    DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "false && \"Property index not found", TEST_LOCATION );
+    DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "! \"Cannot find property index", TEST_LOCATION );
   }
 }
index d600629..5a237d9 100644 (file)
@@ -249,9 +249,10 @@ const std::string& TypeInfo::GetPropertyName( Property::Index index ) const
     return GetImplementation(base).GetPropertyName( index );
   }
 
+  DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
+
   // Property not found, return reference to invalid property string.
   static const std::string EMPTY_PROPERTY_NAME;
-  DALI_LOG_WARNING( "Property index (%d) invalid", index );
   return EMPTY_PROPERTY_NAME;
 }
 
@@ -380,6 +381,10 @@ bool TypeInfo::IsPropertyWritable( Property::Index index ) const
     {
       writable = GetImplementation(base).IsPropertyWritable( index );
     }
+    else
+    {
+      DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
+    }
   }
 
   return writable;
@@ -403,6 +408,10 @@ Property::Type TypeInfo::GetPropertyType( Property::Index index ) const
     {
       type = GetImplementation(base).GetPropertyType( index );
     }
+    else
+    {
+      DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
+    }
   }
 
   return type;
@@ -426,7 +435,7 @@ void TypeInfo::SetProperty( BaseObject *object, Property::Index index, const Pro
     }
     else
     {
-      DALI_ASSERT_ALWAYS( false && "Property index not found" );
+      DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
     }
   }
 }
@@ -449,7 +458,7 @@ void TypeInfo::SetProperty( BaseObject *object, const std::string& name, const P
     }
     else
     {
-      DALI_ASSERT_ALWAYS( false && "Property name not found" );
+      DALI_ASSERT_ALWAYS( ! "Cannot find property name" );
     }
   }
 }
@@ -470,7 +479,7 @@ Property::Value TypeInfo::GetProperty( const BaseObject *object, Property::Index
     return GetImplementation( base ).GetProperty( object, index );
   }
 
-  DALI_ASSERT_ALWAYS( false && "Property index not found" );
+  DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
 
   return Property::Value();
 }
@@ -491,7 +500,7 @@ Property::Value TypeInfo::GetProperty( const BaseObject *object, const std::stri
     return GetImplementation( base ).GetProperty( object, name );
   }
 
-  DALI_ASSERT_ALWAYS( false && "Property name not found" );
+  DALI_ASSERT_ALWAYS( ! "Cannot find property name" );
 
   return Property::Value();
 }
index f40cc1e..ff11e36 100644 (file)
@@ -31,7 +31,7 @@ class ResourceType;
 
 namespace ImageFactoryCache
 {
-class Request;
+struct Request;
 }
 
 /**
index 70a2a1e..0f6d11e 100644 (file)
@@ -97,8 +97,8 @@ AnimatableMeshPtr AnimatableMesh::New(
   DALI_ASSERT_ALWAYS( numVertices > 0 && "Mesh has no vertices" );
   DALI_ASSERT_ALWAYS( ( numVertices * 3 ) < DEFAULT_PROPERTY_MAX_COUNT && "Mesh exceeds maximum supported vertices" );
   DALI_ASSERT_ALWAYS( faceIndices.size() > 0 && "Mesh has no faces" );
-  for( Dali::AnimatableMesh::FacesConstIter faceIter=faceIndices.begin() ;
-       faceIter != faceIndices.end() ;
+  for( Dali::AnimatableMesh::FacesConstIter faceIter=faceIndices.begin();
+       faceIter != faceIndices.end();
        ++faceIter )
   {
     unsigned int faceIndex = *faceIter;
@@ -152,7 +152,7 @@ unsigned int AnimatableMesh::GetNumberOfVertices() const
   return mNumberOfVertices;
 }
 
-Property::Index AnimatableMesh::GetPropertyIndex(
+Property::Index AnimatableMesh::GetVertexPropertyIndex(
   unsigned int vertex,
   Property::Index property ) const
 {
@@ -378,7 +378,7 @@ const SceneGraph::PropertyBase* AnimatableMesh::GetSceneObjectAnimatableProperty
         property = &mSceneObject->mVertices[vertexIndex].color;
         break;
       case Dali::AnimatableVertex::TEXTURE_COORDS:
-        property = &mSceneObject->mVertices[vertexIndex].textureCoords ;
+        property = &mSceneObject->mVertices[vertexIndex].textureCoords;
         break;
 
       default:
index d15d85f..e9d163d 100644 (file)
@@ -87,8 +87,7 @@ public:
   /**
    * Get the property index from the vertex index and the vertex property enumeration
    */
-  using ProxyObject::GetPropertyIndex;
-  Property::Index GetPropertyIndex( unsigned int vertex, Property::Index property ) const;
+  Property::Index GetVertexPropertyIndex( unsigned int vertex, Property::Index property ) const;
 
   /**
    * Set the given vertex position
index 89af73a..7c6f2b5 100644 (file)
@@ -62,7 +62,7 @@ FontMetricsIntrusivePtr FontFactory::GetFontMetrics( const std::string& fontFami
   FontMetricsIter iter = mMetricsCache.find( hashValue );
   if ( iter == mMetricsCache.end() )
   {
-    metrics = FontMetrics::New( Vector2(mHorizontalDpi, mVerticalDpi), hashValue, mFontCount, fontFamily, fontStyle, mResourceClient );
+    metrics = FontMetrics::New( Vector2(mHorizontalDpi, mVerticalDpi), hashValue, mFontCount, fontFamily, fontStyle );
     mFontCount++;
 
     // load the global metrics
@@ -113,7 +113,7 @@ void FontFactory::GetFontInformation( FontId fontId,
 
   for( FontMetricsMap::const_iterator iter =  mMetricsCache.begin(); iter != endIter; ++iter)
   {
-    const FontMetrics* metric( (*iter).second.Get() ) ;
+    const FontMetrics* metric( (*iter).second.Get() );
 
     if( metric->GetFontId() == fontId)
     {
index a30c78e..334b7e5 100644 (file)
@@ -62,10 +62,9 @@ FontMetricsIntrusivePtr FontMetrics::New( const Vector2& dpi,
                                           const std::size_t hashValue,
                                           const FontId fontId,
                                           const std::string& fontFamily,
-                                          const std::string& fontStyle,
-                                          ResourceClient& resourceClient )
+                                          const std::string& fontStyle )
 {
-  return new FontMetrics( dpi, hashValue, fontId, fontFamily, fontStyle, resourceClient);
+  return new FontMetrics( dpi, hashValue, fontId, fontFamily, fontStyle );
 }
 
 void FontMetrics::LoadGlobalMetrics()
@@ -417,8 +416,7 @@ FontMetrics::FontMetrics(const Vector2& dpi,
                          const std::size_t hashValue,
                          const FontId fontId,
                          const std::string& fontFamily,
-                         const std::string& fontStyle,
-                         ResourceClient& resourceClient )
+                         const std::string& fontStyle )
 :
   mFontFamily(fontFamily),
   mFontStyle(fontStyle),
index 65762c7..35cd7c7 100644 (file)
@@ -65,7 +65,6 @@ namespace Internal
 // Forward declarations.
 
 class FontMetrics;
-class ResourceClient;
 
 typedef IntrusivePtr<FontMetrics> FontMetricsIntrusivePtr;
 
@@ -88,15 +87,13 @@ public:
    * @param [in] fontId font id.
    * @param [in] fontFamily the font family
    * @param [in] fontStyle the font style
-   * @param [in] resourceClient resource client
    * @return An intrusive-pointer to the new instance.
    */
   static FontMetricsIntrusivePtr New( const Vector2& dpi,
                                       const std::size_t hashValue,
                                       const FontId fontId,
                                       const std::string& fontFamily,
-                                      const std::string& fontStyle,
-                                      ResourceClient& resourceClient );
+                                      const std::string& fontStyle );
 
 
   /**
@@ -291,8 +288,7 @@ private:
                const std::size_t hashValue,
                const FontId fontId,
                const std::string& fontFamily,
-               const std::string& fontStyle,
-               ResourceClient& resourceClient );
+               const std::string& fontStyle );
 
   /**
    * Virtual destructor.
index 1f903f4..08a798a 100644 (file)
@@ -71,7 +71,7 @@ Property::Index AnimatableMesh::GetPropertyIndex(
 {
   DALI_ASSERT_ALWAYS( index < GetNumberOfVertices() && "Index out of bounds" );
 
-  return GetImplementation(*this).GetPropertyIndex( index, property );
+  return GetImplementation(*this).GetVertexPropertyIndex( index, property );
 }
 
 Property AnimatableMesh::GetVertexProperty( unsigned int vertex, Property::Index property)
index 82a5b64..1ab41a5 100644 (file)
@@ -35,37 +35,37 @@ AnimatableVertex::~AnimatableVertex()
 
 void AnimatableVertex::SetPosition(const Vector3& position)
 {
-  mMesh.SetProperty( mMesh.GetPropertyIndex(mVertex, POSITION), Property::Value(position) );
+  mMesh.SetProperty( mMesh.GetVertexPropertyIndex(mVertex, POSITION), Property::Value(position) );
 }
 
 void AnimatableVertex::SetColor(const Vector4& color)
 {
-  mMesh.SetProperty( mMesh.GetPropertyIndex(mVertex, COLOR), Property::Value(color) );
+  mMesh.SetProperty( mMesh.GetVertexPropertyIndex(mVertex, COLOR), Property::Value(color) );
 }
 
 void AnimatableVertex::SetTextureCoords(const Vector2& textureCoords)
 {
-  mMesh.SetProperty( mMesh.GetPropertyIndex(mVertex, TEXTURE_COORDS), Property::Value(textureCoords) );
+  mMesh.SetProperty( mMesh.GetVertexPropertyIndex(mVertex, TEXTURE_COORDS), Property::Value(textureCoords) );
 }
 
 Vector3 AnimatableVertex::GetCurrentPosition()
 {
   Vector3 position;
-  mMesh.GetProperty( mMesh.GetPropertyIndex(mVertex, POSITION) ).Get(position);
+  mMesh.GetProperty( mMesh.GetVertexPropertyIndex(mVertex, POSITION) ).Get(position);
   return position;
 }
 
 Vector4 AnimatableVertex::GetCurrentColor()
 {
   Vector4 color;
-  mMesh.GetProperty( mMesh.GetPropertyIndex(mVertex, COLOR) ).Get(color);
+  mMesh.GetProperty( mMesh.GetVertexPropertyIndex(mVertex, COLOR) ).Get(color);
   return color;
 }
 
 Vector2 AnimatableVertex::GetCurrentTextureCoords()
 {
   Vector2 textureCoords;
-  mMesh.GetProperty( mMesh.GetPropertyIndex(mVertex, TEXTURE_COORDS) ).Get(textureCoords);
+  mMesh.GetProperty( mMesh.GetVertexPropertyIndex(mVertex, TEXTURE_COORDS) ).Get(textureCoords);
   return textureCoords;
 }