actual/packages/node-libofx/OpenSP-1.5.2/lib/IListBase.cxx

37 lines
536 B
C++
Raw Normal View History

2022-04-29 02:44:38 +00:00
// Copyright (c) 1994 James Clark
// See the file COPYING for copying permission.
#include "splib.h"
#include "IListBase.h"
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#endif
void IListBase::append(Link *p)
{
Link **pp;
for (pp = &head_; *pp; pp = &(*pp)->next_)
;
*pp = p;
}
void IListBase::remove(Link *p)
{
for (Link **pp = &head_; *pp; pp = &(*pp)->next_)
if (*pp == p) {
*pp = p->next_;
break;
}
}
void IListBase::clear()
{
while (!empty())
delete get();
}
#ifdef SP_NAMESPACE
}
#endif