[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/sdk/kdevplatform/language/duchain
From: Milian Wolff <mail () milianw ! de>
Date: 2010-04-07 11:48:34
Message-ID: 20100407114834.591DBAC89A () svn ! kde ! org
[Download RAW message or body]
SVN commit 1112114 by mwolff:
use KDevVarLengthArray.contains (vector has it also), no need to duplicate code
M +0 -8 arrayhelpers.h
M +1 -1 ducontext.cpp
--- trunk/extragear/sdk/kdevplatform/language/duchain/arrayhelpers.h #1112113:1112114
@@ -46,14 +46,6 @@
}
template<class Container, class Type>
-bool arrayContains(Container& container, const Type& value) {
- for(int a = 0; a < container.size(); ++a)
- if(container[a] == value)
- return true;
-
- return false;
-}
-template<class Container, class Type>
void insertToArray(Container& array, const Type& item, int position) {
Q_ASSERT(position >= 0 && position <= array.size());
array.resize(array.size()+1);
--- trunk/extragear/sdk/kdevplatform/language/duchain/ducontext.cpp #1112113:1112114
@@ -488,7 +488,7 @@
if(import.isDirect()) {
//Direct importers are registered directly within the data
- if(arrayContains(m_context->d_func_dynamic()->m_importersList(), \
IndexedDUContext(context))) { + \
if(m_context->d_func_dynamic()->m_importersList().contains(IndexedDUContext(context))) \
{
kDebug(9505) << m_context->scopeIdentifier(true).toString() << "importer added \
multiple times:" << context->scopeIdentifier(true).toString(); return;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic