aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/itempool.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-08-12 15:53:28 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-08-14 13:47:04 +0000
commite9ea57525002e03389921121806269e1ef004618 (patch)
tree62ecb7e657dc8934249ccc3332ad5bc1f8619248 /src/lib/corelib/language/itempool.cpp
parent4bb536e9aacac02c3157c00fc98c6072105f7401 (diff)
Give the Item class a proper type attribute.
This replaces both the m_flags member and conceptually also the m_typeName one. We still keep the latter, but do not change it anymore when resolving item inheritance; this makes for potentially somewhat nicer error messages. As a side effect, project resolving becomes slightly faster, presumably due to having to do fewer string comparisons. Change-Id: Ieeea0eca74c4cf744b005730efeccf5ebc44589b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/lib/corelib/language/itempool.cpp')
-rw-r--r--src/lib/corelib/language/itempool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/corelib/language/itempool.cpp b/src/lib/corelib/language/itempool.cpp
index 0ddf13f15..1adc347ad 100644
--- a/src/lib/corelib/language/itempool.cpp
+++ b/src/lib/corelib/language/itempool.cpp
@@ -44,9 +44,9 @@ ItemPool::~ItemPool()
(*it)->~Item();
}
-Item *ItemPool::allocateItem()
+Item *ItemPool::allocateItem(const ItemType &type)
{
- Item *item = new (&m_pool) Item(this);
+ Item *item = new (&m_pool) Item(this, type);
m_items.push_back(item);
return item;
}