From 6a32dea589efacd7ad2306e68a2a9cf504a1ec0c Mon Sep 17 00:00:00 2001 From: Faysal Date: Tue, 2 Jul 2013 18:51:09 +0600 Subject: [PATCH] Beautify Source Code of base_collection/* Change-Id: If864a3cb6b316fac4d55a166470810deffa5e410 Signed-off-by: Faysal --- src/base/collection/FBaseColArrayList.cpp | 8 ++------ src/base/collection/FBaseColHashMap.cpp | 8 +++----- src/base/collection/FBaseColLinkedList.cpp | 5 +---- src/base/collection/FBaseColMapEntry.cpp | 11 +++++------ src/base/collection/FBaseColMultiHashMap.cpp | 8 +++----- src/base/collection/FBaseColQueue.cpp | 8 +++----- src/base/collection/FBaseColStack.cpp | 4 ---- src/base/collection/FBaseColTypes.cpp | 14 ++++++-------- 8 files changed, 23 insertions(+), 43 deletions(-) diff --git a/src/base/collection/FBaseColArrayList.cpp b/src/base/collection/FBaseColArrayList.cpp index 33ae5af..9fa2a67 100644 --- a/src/base/collection/FBaseColArrayList.cpp +++ b/src/base/collection/FBaseColArrayList.cpp @@ -18,7 +18,6 @@ * @file FBaseColArrayList.cpp * @brief This is the implementation for ArrayList class. */ - #include #include @@ -26,7 +25,6 @@ #include #include - namespace Tizen { namespace Base { namespace Collection { @@ -103,7 +101,6 @@ _ArrayListEnumerator::Reset(void) return E_SUCCESS; } - result _ArrayListEnumerator::MovePrevious(void) { @@ -419,9 +416,9 @@ ArrayList::RemoveItems(int startIndex, int count) { SysTryReturnResult(NID_BASE_COL, startIndex >= 0 && count >= 0, E_OUT_OF_RANGE, "Both of the startIndex(%d) and count(%d) MUST be greater than or equal to 0.", startIndex, count); SysTryReturnResult(NID_BASE_COL, startIndex < __count, E_OUT_OF_RANGE, - "The startIndex(%d) MUST be less than the number of elements(%d).", startIndex, __count); + "The startIndex(%d) MUST be less than the number of elements(%d).", startIndex, __count); SysTryReturnResult(NID_BASE_COL, count <= __count && (startIndex + count <= __count), E_OUT_OF_RANGE, - "The startIndex(%d) + count(%d) MUST be less than or equal to the number of elements(%d).", startIndex, count, __count); + "The startIndex(%d) + count(%d) MUST be less than or equal to the number of elements(%d).", startIndex, count, __count); if (count > 0) { @@ -724,5 +721,4 @@ ArrayList::SetDeleter(DeleterFunctionType deleter) { __deleter = deleter; } - }}} // Tizen::Base::Collection diff --git a/src/base/collection/FBaseColHashMap.cpp b/src/base/collection/FBaseColHashMap.cpp index bec9d8a..599f724 100644 --- a/src/base/collection/FBaseColHashMap.cpp +++ b/src/base/collection/FBaseColHashMap.cpp @@ -18,7 +18,6 @@ * @file FBaseColHashMap.cpp * @brief This is the implementation for HashMap class. */ - #include #include #include @@ -28,7 +27,6 @@ #include #include - namespace Tizen { namespace Base { namespace Collection { @@ -43,7 +41,7 @@ public: /** * This is the constructor. * - * @param[in] pKey A key to be included in this entry. It can not be @c null. + * @param[in] pKey A key to be included in this entry. It can not be @c null. * @param[in] pValue A value to be included in this entry. It can not be @c null. * @param[in] pNext A pointer to the next entry * @param[in] hash An hash value of the key @@ -508,7 +506,7 @@ CATCH: result HashMap::Add(Object* pKey, Object* pValue) { - SysTryReturnResult(NID_BASE_COL, pKey != null , E_INVALID_ARG, "Invalid argument used. The pKey is null"); + SysTryReturnResult(NID_BASE_COL, pKey != null, E_INVALID_ARG, "Invalid argument used. The pKey is null"); SysTryReturnResult(NID_BASE_COL, pValue != null, E_INVALID_ARG, "Invalid argument used. The pValue is null"); int hash = Hash(*pKey); @@ -930,4 +928,4 @@ HashMap::SetDeleter(DeleterFunctionType deleter) { __deleter = deleter; } -} } } // Tizen::Base::Collectionn +}}} // Tizen::Base::Collectionn \ No newline at end of file diff --git a/src/base/collection/FBaseColLinkedList.cpp b/src/base/collection/FBaseColLinkedList.cpp index 2503d57..b90abba 100644 --- a/src/base/collection/FBaseColLinkedList.cpp +++ b/src/base/collection/FBaseColLinkedList.cpp @@ -18,14 +18,12 @@ * @file FBaseColLinkedList.cpp * @brief This is the implementation for LinkedList class. */ - #include #include #include #include #include - namespace Tizen { namespace Base { namespace Collection { @@ -958,5 +956,4 @@ LinkedList::SetDeleter(DeleterFunctionType deleter) { __deleter = deleter; } - -} } } // Tizen::Base::Collection +}}} // Tizen::Base::Collection diff --git a/src/base/collection/FBaseColMapEntry.cpp b/src/base/collection/FBaseColMapEntry.cpp index 879ab3b..8e16fce 100644 --- a/src/base/collection/FBaseColMapEntry.cpp +++ b/src/base/collection/FBaseColMapEntry.cpp @@ -18,11 +18,9 @@ * @file FBaseColMapEntry.cpp * @brief This is the implementation for MapEntry class. */ - #include #include - namespace Tizen { namespace Base { namespace Collection { @@ -36,8 +34,8 @@ MapEntry::MapEntry(void) MapEntry::MapEntry(const Object& pKey, const Object& pValue) : __pMapEntryImpl(null) { - _pKey = const_cast (&pKey); - _pValue = const_cast (&pValue); + _pKey = const_cast< Object* >(&pKey); + _pValue = const_cast< Object* >(&pValue); } MapEntry::~MapEntry(void) @@ -71,7 +69,7 @@ MapEntry::GetValue(void) bool MapEntry::Equals(const Object& obj) const { - const MapEntry* pOther = dynamic_cast (&obj); + const MapEntry* pOther = dynamic_cast< const MapEntry* >(&obj); if (pOther == null) { return false; @@ -84,6 +82,7 @@ MapEntry::Equals(const Object& obj) const return false; } + int MapEntry::GetHashCode(void) const { @@ -98,4 +97,4 @@ MapEntry::GetHashCode(void) const } return hash; } -} } } // Tizen::Base::Collection +}}} // Tizen::Base::Collection \ No newline at end of file diff --git a/src/base/collection/FBaseColMultiHashMap.cpp b/src/base/collection/FBaseColMultiHashMap.cpp index 0d0427c..721050d 100644 --- a/src/base/collection/FBaseColMultiHashMap.cpp +++ b/src/base/collection/FBaseColMultiHashMap.cpp @@ -18,7 +18,6 @@ * @file FBaseColMultiHashMap.cpp * @brief This is the implementation for MultiHashMap class. */ - #include #include #include @@ -28,7 +27,6 @@ #include #include - namespace Tizen { namespace Base { namespace Collection { @@ -532,7 +530,7 @@ CATCH: result MultiHashMap::Add(Object* pKey, Object* pValue) { - SysTryReturnResult(NID_BASE_COL, pKey != null , E_INVALID_ARG, "Invalid argument used. The pKey is null"); + SysTryReturnResult(NID_BASE_COL, pKey != null, E_INVALID_ARG, "Invalid argument used. The pKey is null"); SysTryReturnResult(NID_BASE_COL, pValue != null, E_INVALID_ARG, "Invalid argument used. The pValue is null"); __Node* pNewNode = null; @@ -844,7 +842,7 @@ MultiHashMap::RemoveAll(void) result MultiHashMap::SetValue(const Object& key, const Object& value, Object* pNewValue) { - SysTryReturnResult(NID_BASE_COL, pNewValue != null , E_INVALID_ARG, "Invalid argument used. The pNewValue is null"); + SysTryReturnResult(NID_BASE_COL, pNewValue != null, E_INVALID_ARG, "Invalid argument used. The pNewValue is null"); result r = E_SUCCESS; int hash = Hash(key); @@ -1189,4 +1187,4 @@ MultiHashMap::SetDeleter(DeleterFunctionType deleter) { __deleter = deleter; } -} } } // Tizen::Base::Collectionn +}}} // Tizen::Base::Collectionn \ No newline at end of file diff --git a/src/base/collection/FBaseColQueue.cpp b/src/base/collection/FBaseColQueue.cpp index dc47501..f168632 100644 --- a/src/base/collection/FBaseColQueue.cpp +++ b/src/base/collection/FBaseColQueue.cpp @@ -15,17 +15,15 @@ // /** - * @file FBaseColQueue.cpp - * @brief This is the implementation for Queue class. + * @file FBaseColQueue.cpp + * @brief This is the implementation for Queue class. */ - #include #include #include #include #include - namespace Tizen { namespace Base { namespace Collection { @@ -351,4 +349,4 @@ Queue::GetHashCode(void) const } return hash; } -}}} // Tizen::Base::Collection +}}} // Tizen::Base::Collection \ No newline at end of file diff --git a/src/base/collection/FBaseColStack.cpp b/src/base/collection/FBaseColStack.cpp index 4b39f62..b38b30d 100644 --- a/src/base/collection/FBaseColStack.cpp +++ b/src/base/collection/FBaseColStack.cpp @@ -18,15 +18,12 @@ * @file FBaseColStack.cpp * @brief This is the implementation for Stack class. */ - #include #include #include #include #include - - using namespace Tizen::Base::Runtime; namespace Tizen { namespace Base { namespace Collection @@ -338,5 +335,4 @@ Stack::GetHashCode(void) const return hash; } - }}} // Tizen::Base::Collection diff --git a/src/base/collection/FBaseColTypes.cpp b/src/base/collection/FBaseColTypes.cpp index 0960030..295bbff 100644 --- a/src/base/collection/FBaseColTypes.cpp +++ b/src/base/collection/FBaseColTypes.cpp @@ -15,10 +15,9 @@ // /** - * @file FBaseColTypes.cpp - * @brief This is the implementation for the element deleter. + * @file FBaseColTypes.cpp + * @brief This is the implementation for the element deleter. */ - #include namespace Tizen { namespace Base { namespace Collection @@ -29,7 +28,7 @@ namespace Tizen { namespace Base { namespace Collection * * @since 2.0 * - * @param[in] pObj The pointer to object to be removed. + * @param[in] pObj The pointer to object to be removed. */ void NoOpDeleter(Object* pObj) @@ -41,7 +40,7 @@ NoOpDeleter(Object* pObj) * * @since 2.0 * - * @param[in] pObj The pointer to object to be removed. + * @param[in] pObj The pointer to object to be removed. */ void SingleObjectDeleter(Object* pObj) @@ -54,12 +53,11 @@ SingleObjectDeleter(Object* pObj) * * @since 2.0 * - * @param[in] pObj The pointer to object to be removed. + * @param[in] pObj The pointer to object to be removed. */ void ArrayDeleter(Object* pObj) { delete[] pObj; } - -}}} // Tizen::Base::Collection +}}} // Tizen::Base::Collection \ No newline at end of file -- 2.7.4