changed map and list templates to be more useable, however, they will

be rewritten soon. Changed debugging macros and use of them, too.
Also replaced the linked lists in the BufferManager (which were complicated,
but working ok) with template based ones.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2133 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2002-12-03 00:59:42 +00:00
parent 68bb610bbc
commit 353b9f6bce
26 changed files with 297 additions and 253 deletions
+23 -1
View File
@@ -5,7 +5,16 @@ template<class value> class List
{
public:
List() : count(0) {}
List(const List<value> &other)
{
printf("template<class value> class List copy constructor\n");
count = other.count;
for (int i = 0; i < count; i++)
list[i] = other.list[i];
hmpt;
}
void Insert(const value &v)
{
value temp;
@@ -42,6 +51,19 @@ public:
return true;
}
int Find(const value &v)
{
for (int i = 0; i < count; i++)
if (list[i] == v)
return i;
return -1;
}
bool IsEmpty()
{
return count == 0;
}
void MakeEmpty()
{
count = 0;