Import backup from 2005-09-13

This commit is contained in:
josh committed 2017-07-25 22:23:51 -04:00
1 parent 0521733e20
commit 79ca453f66
7 files changed
+60 -49

No files matched your search

+10 -1
View File
@@ -52,6 +52,9 @@ public:
/* Direct access operators */
const type & operator[](unsigned int index) const;
type & operator[](unsigned int index);
/* Returns pointer to data */
type **data();
};
template<typename type>
@@ -122,7 +125,6 @@ vector<type> & vector<type>::add(type elem)
while (mySize >= myAllocated)
grow();
myData[mySize++] = new type(elem);
kprintf("vector.h: added element %d @ 0x%x\n", mySize-1, myData[mySize-1]);
return *this;
}
@@ -168,4 +170,11 @@ vector<type> & vector<type>::insert(type elem, unsigned int position)
return *this;
}
template<typename type>
type **vector<type>::data()
{
return myData;
}
#endif