Commit 4068957f authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Removed the usage of CPlusPlus::Array<T>

parent 32d0bc1f
...@@ -66,16 +66,20 @@ static void delete_map_entries(_Iterator first, _Iterator last) ...@@ -66,16 +66,20 @@ static void delete_map_entries(_Iterator first, _Iterator last)
delete first->second; delete first->second;
} }
template <typename _Iterator>
static void delete_array_entries(_Iterator first, _Iterator last)
{
for (; first != last; ++first)
delete *first;
}
template <typename _Map> template <typename _Map>
static void delete_map_entries(const _Map &m) static void delete_map_entries(const _Map &m)
{ delete_map_entries(m.begin(), m.end()); } { delete_map_entries(m.begin(), m.end()); }
template <typename _Array> template <typename _Array>
static void delete_array_entries(const _Array &a) static void delete_array_entries(const _Array &a)
{ { delete_array_entries(a.begin(), a.end()); }
for (unsigned i = 0; i < a.size(); ++i)
delete a.at(i);
}
class Control::Data class Control::Data
{ {
...@@ -515,16 +519,16 @@ public: ...@@ -515,16 +519,16 @@ public:
// types // types
VoidType voidType; VoidType voidType;
Array<IntegerType *> integerTypes; std::vector<IntegerType *> integerTypes;
Array<FloatType *> floatTypes; std::vector<FloatType *> floatTypes;
Array<PointerToMemberType *> pointerToMemberTypes; std::vector<PointerToMemberType *> pointerToMemberTypes;
Array<PointerType *> pointerTypes; std::vector<PointerType *> pointerTypes;
Array<ReferenceType *> referenceTypes; std::vector<ReferenceType *> referenceTypes;
Array<ArrayType *> arrayTypes; std::vector<ArrayType *> arrayTypes;
Array<NamedType *> namedTypes; std::vector<NamedType *> namedTypes;
// symbols // symbols
Array<Symbol *> symbols; std::vector<Symbol *> symbols;
// ObjC context keywords: // ObjC context keywords:
Identifier *objcGetterId; Identifier *objcGetterId;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment