From d90cb8d58b1ea3b9972ef3577ea5898fa25de30d Mon Sep 17 00:00:00 2001 From: Dae Young Ryu Date: Tue, 10 Dec 2013 11:31:05 +0900 Subject: [PATCH] remove no more needed functions Change-Id: I191287543ca41937aab12225e932347fa69ed5cd Signed-off-by: Dae Young Ryu --- inc/FUiAnimMesh.h | 47 ------------------------- src/ui/animations/FUiAnimMesh.cpp | 24 ------------- src/ui/animations/FUiAnim_MeshImpl.cpp | 16 ++++----- src/ui/animations/FUiAnim_MeshImportSample.cpp | 2 -- src/ui/animations/FUiAnim_ModelImporterImpl.cpp | 6 ++-- src/ui/animations/FUiAnim_SceneImpl.cpp | 9 ++--- src/ui/animations/FUiAnim_VisualElementImpl.cpp | 2 -- 7 files changed, 14 insertions(+), 92 deletions(-) diff --git a/inc/FUiAnimMesh.h b/inc/FUiAnimMesh.h index 7437962..ecaacbf 100644 --- a/inc/FUiAnimMesh.h +++ b/inc/FUiAnimMesh.h @@ -362,53 +362,6 @@ public: */ result ReserveIndices(int count); - /** - * Allocating texture coordinates of the mesh. - * - * @since 3.0 - * - * @return An error code - * @exception E_SUCCESS The method is successful - * @exception E_ALREADY_SET Texture coordinates have already been allocated - * @exception E_INVALID_STATE Incorrect count of allocated vertex. Either of the following conditions has occurred: - * - The count of allocated vertices is zero; - * - The count of allocated vertices is minus value. - * @exception E_OUT_OF_MEMORY Insufficient memory for allocating texture coordinates - * @remarks This method depends from count of allocated vertices - */ - result ReserveTextureCoordinates(void); - - /** - * Allocating normals of the mesh. - * - * @since 3.0 - * - * @return An error code - * @exception E_SUCCESS The method is successful - * @exception E_ALREADY_SET Normals have already been allocated - * @exception E_INVALID_STATE Incorrect count of allocated vertex. Either of the following conditions has occurred: - * - The count of allocated vertices is zero; - * - The count of allocated vertices is minus value. - * @exception E_OUT_OF_MEMORY Insufficient memory for allocating normals - * @remarks This method depends from count of allocated vertices - */ - result ReserveNormals(void); - - /** - * Allocating colors of the mesh. - * - * @since 3.0 - * - * @return An error code - * @exception E_SUCCESS The method is successful. - * @exception E_ALREADY_SET Colors have already been allocated - * @exception E_INVALID_STATE Incorrect count of allocated vertex. Either of the following conditions has occurred: - * - The count of allocated vertices is zero; - * - The count of allocated vertices is minus value. - * @exception E_OUT_OF_MEMORY Insufficient memory for allocating colors - * @remarks This method depends from count of allocated vertices - */ - result ReserveColors(void); /** * Saving mesh to binary file. diff --git a/src/ui/animations/FUiAnimMesh.cpp b/src/ui/animations/FUiAnimMesh.cpp index 815fde7..6614b3b 100644 --- a/src/ui/animations/FUiAnimMesh.cpp +++ b/src/ui/animations/FUiAnimMesh.cpp @@ -236,30 +236,6 @@ Mesh::ReserveIndices(int count) return __pMeshImpl->AllocIndices(count); } -result -Mesh::ReserveTextureCoordinates(void) -{ - SetLastResult(E_SUCCESS); - CHECK_CONSTRUCTED; - return __pMeshImpl->AllocTextureCoordinates(); -} - -result -Mesh::ReserveNormals(void) -{ - SetLastResult(E_SUCCESS); - CHECK_CONSTRUCTED; - return __pMeshImpl->AllocNormals(); -} - -result -Mesh::ReserveColors(void) -{ - SetLastResult(E_SUCCESS); - CHECK_CONSTRUCTED; - return __pMeshImpl->AllocColors(); -} - bool Mesh::IsIndexEnabled(void) const { diff --git a/src/ui/animations/FUiAnim_MeshImpl.cpp b/src/ui/animations/FUiAnim_MeshImpl.cpp index 5f0ee5e..962b9f9 100644 --- a/src/ui/animations/FUiAnim_MeshImpl.cpp +++ b/src/ui/animations/FUiAnim_MeshImpl.cpp @@ -100,7 +100,7 @@ _MeshImpl::_MeshImpl(const Mesh& mesh) __pLock = new _Mutex(true); } -_MeshImpl::~_MeshImpl() +_MeshImpl::~_MeshImpl(void) { Clear(); @@ -113,7 +113,7 @@ _MeshImpl::~_MeshImpl() } void -_MeshImpl::Clear() +_MeshImpl::Clear(void) { MESH_LOCK(); #define FREE( __POINTER)if( __POINTER) delete __POINTER; __POINTER = null @@ -164,12 +164,12 @@ _MeshImpl::AllocVertices(int count) result -_MeshImpl::AllocTextureCoordinates() +_MeshImpl::AllocTextureCoordinates(void) { MESH_LOCK(); SysTryReturnResult(NID_UI_ANIM, __pTexCoordinates == null, E_ALREADY_SET, " TextureCoordinates have already been allocated"); - SysTryReturnResult(NID_UI_ANIM, __countOfAllocatedVertex > 0, E_INVALID_STATE, " Invalid argument in order to set size of TextCoordinates"); + SysTryReturnResult(NID_UI_ANIM, __countOfAllocatedVertex > 0, E_INVALID_STATE, " Vertices are not allocated"); int count = __countOfAllocatedVertex * APPROPRIATE_COUNT_TEXTCOORDINATES; __pTexCoordinates = new (std::nothrow) float[count]; @@ -187,7 +187,7 @@ _MeshImpl::AllocTextureCoordinates() } result -_MeshImpl::AllocNormals() +_MeshImpl::AllocNormals(void) { MESH_LOCK(); @@ -210,7 +210,7 @@ _MeshImpl::AllocNormals() } result -_MeshImpl::AllocColors() +_MeshImpl::AllocColors(void) { MESH_LOCK(); @@ -294,7 +294,7 @@ _MeshImpl::SetTextureCoord(int arrayIndex, const FloatPoint& textureCoord) if(__pTexCoordinates == null) { r = AllocTextureCoordinates(); - SysTryReturnResult(NID_UI_ANIM, r != E_OUT_OF_MEMORY, r, " Memory allocation failed due to out of memory"); + SysTryReturnResult(NID_UI_ANIM, r != E_OUT_OF_MEMORY, r, " Memory allocation failed due to out of memory"); } SysTryReturnResult(NID_UI_ANIM, __pTexCoordinates, E_INVALID_STATE, " TexCoordinates haven't been allocated"); @@ -464,7 +464,7 @@ _MeshImpl::SetGeometryType(Mesh::GeometryType type) } Mesh::GeometryType -_MeshImpl::GetGeometryType() const +_MeshImpl::GetGeometryType(void) const { return __geoType; } diff --git a/src/ui/animations/FUiAnim_MeshImportSample.cpp b/src/ui/animations/FUiAnim_MeshImportSample.cpp index a0dc61d..c0bbde9 100644 --- a/src/ui/animations/FUiAnim_MeshImportSample.cpp +++ b/src/ui/animations/FUiAnim_MeshImportSample.cpp @@ -512,8 +512,6 @@ bool _MeshImportSample::Parsing(char* pStrAse) // pMesh->MESH_TFACELIST = new unsigned short int[3 * pMesh->MESH_NUMTVFACES]; // pMesh->MESH_TFACELIST_REAL = new float[2 * 3 * pMesh->MESH_NUMTVFACES]; - pMesh->ReserveTextureCoordinates(); - FloatPoint texCoord; // int k = 0; for(int i = 0,j = 0; i< MESH_NUMTVFACES;) diff --git a/src/ui/animations/FUiAnim_ModelImporterImpl.cpp b/src/ui/animations/FUiAnim_ModelImporterImpl.cpp index e6aabc1..67463f8 100644 --- a/src/ui/animations/FUiAnim_ModelImporterImpl.cpp +++ b/src/ui/animations/FUiAnim_ModelImporterImpl.cpp @@ -496,7 +496,7 @@ _ModelImporterImpl::LoadMesh(Mesh& pMesh, GeometryMesh::Indexes& VertexIndices, //Vertices & Normals pMesh.ReserveVertices(listVertices.size()); - pMesh.ReserveNormals(); +// pMesh.ReserveNormals(); unsigned int index = 0; for (std::list::iterator i = listVertices.begin(); i != listVertices.end(); i++, index++) { @@ -626,8 +626,8 @@ _ModelImporterImpl::LoadMesh(Mesh& pMesh, GeometryMesh::Indexes& VertexIndices, //Vertices & Normals & Texture Coordinates pMesh.ReserveVertices(listVertices.size()); - pMesh.ReserveNormals(); - pMesh.ReserveTextureCoordinates(); +// pMesh.ReserveNormals(); +// pMesh.ReserveTextureCoordinates(); unsigned int index = 0; for (std::list::iterator i = listVertices.begin(); i != listVertices.end(); i++, index++) { diff --git a/src/ui/animations/FUiAnim_SceneImpl.cpp b/src/ui/animations/FUiAnim_SceneImpl.cpp index dc0eeb5..a0d970e 100644 --- a/src/ui/animations/FUiAnim_SceneImpl.cpp +++ b/src/ui/animations/FUiAnim_SceneImpl.cpp @@ -109,8 +109,7 @@ _SceneImpl::Construct(VisualElement& pSceneRootVisualElement) _pSceneRootVisualElement = &pSceneRootVisualElement; // _pSceneFakeRootVisualElement = new (std::nothrow) VisualElement(); -// SysTryReturnResult(NID_UI_ANIM, _pSceneFakeRootVisualElement != null, E_OUT_OF_MEMORY, \ -// "[E_OUT_OF_MEMORY] Insufficient memory."); +// SysTryReturnResult(NID_UI_ANIM, _pSceneFakeRootVisualElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); // // _pSceneFakeRootVisualElement->Construct(); // _pSceneFakeRootVisualElement->SetName("SceneFakeRootVisualElement"); @@ -2049,8 +2048,7 @@ _SceneImpl::SaveScene(const Tizen::Base::String filesPath, const Tizen::Base::St ////for UTF-8 shader saving in .are // rc = xmlTextWriterWriteElement(writer, BAD_CAST "VertexShader", BAD_CAST tempString.c_str()); -// SysTryCatch(NID_UI_ANIM, rc >= 0, , E_SYSTEM, \ - "Failed to write with XmlWriter while saving scene \"%ls\"", _name.GetPointer()); +// SysTryCatch(NID_UI_ANIM, rc >= 0, , E_SYSTEM, "Failed to write with XmlWriter while saving scene \"%ls\"", _name.GetPointer()); tempTString.Format(resourceFilesPath.GetLength() + xmlFileName.GetLength() + fragmentShaderResFileName.GetLength() + fragmentShaderResFileExtension.GetLength() + 8 + 2, \ L"%ls%ls%ls%04d%ls", resourceFilesPath.GetPointer(), xmlFileName.GetPointer(), fragmentShaderResFileName.GetPointer(), i, fragmentShaderResFileExtension.GetPointer()); @@ -2070,8 +2068,7 @@ _SceneImpl::SaveScene(const Tizen::Base::String filesPath, const Tizen::Base::St ////for UTF-8 shader saving in .are // rc = xmlTextWriterWriteElement(writer, BAD_CAST "FragmentShader", BAD_CAST tempString.c_str()); -// SysTryCatch(NID_UI_ANIM, rc >= 0, , E_SYSTEM, \ - "Failed to write with XmlWriter while saving scene \"%ls\"", _name.GetPointer()); +// SysTryCatch(NID_UI_ANIM, rc >= 0, , E_SYSTEM, "Failed to write with XmlWriter while saving scene \"%ls\"", _name.GetPointer()); //close "ShaderProgram" element rc = xmlTextWriterEndElement(writer); diff --git a/src/ui/animations/FUiAnim_VisualElementImpl.cpp b/src/ui/animations/FUiAnim_VisualElementImpl.cpp index 2fbed4e..8804246 100644 --- a/src/ui/animations/FUiAnim_VisualElementImpl.cpp +++ b/src/ui/animations/FUiAnim_VisualElementImpl.cpp @@ -701,7 +701,6 @@ _VisualElementImpl::Destroy(void) return; } - { __isDestroying = true; @@ -773,7 +772,6 @@ _VisualElementImpl::Destroy(void) __pModel = null; } - } delete this; } -- 2.7.4