mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-11 05:22:40 -04:00
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
$NetBSD: patch-af,v 1.2 2013/10/15 14:48:38 joerg Exp $
|
|
|
|
--- async/vec.h.orig 2002-05-28 10:29:16.000000000 +0000
|
|
+++ async/vec.h
|
|
@@ -72,7 +72,14 @@ public:
|
|
};
|
|
|
|
template<class T, size_t N = 0> class vec : public vec_base<T, N> {
|
|
+
|
|
typedef typename vec_base<T, N>::elm_t elm_t;
|
|
+
|
|
+ vec_base<T, N>::basep;
|
|
+ vec_base<T, N>::firstp;
|
|
+ vec_base<T, N>::lastp;
|
|
+ vec_base<T, N>::limp;
|
|
+
|
|
void move (elm_t *dst) {
|
|
if (dst == firstp)
|
|
return;
|
|
@@ -92,8 +99,8 @@ template<class T, size_t N = 0> class ve
|
|
{ return *new (implicit_cast<void *> (&e)) elm_t (v); }
|
|
static void destroy (elm_t &e) { e.~elm_t (); }
|
|
|
|
- void init () { lastp = firstp = basep = def_basep (); limp = def_limp (); }
|
|
- void del () { while (firstp < lastp) firstp++->~elm_t (); bfree (basep); }
|
|
+ void init () { lastp = firstp = basep = this->def_basep (); limp = this->def_limp (); }
|
|
+ void del () { while (firstp < lastp) firstp++->~elm_t (); this->bfree (basep); }
|
|
|
|
#define append(v) \
|
|
do { \
|
|
@@ -134,7 +141,7 @@ public:
|
|
elm_t *obasep = basep;
|
|
move (static_cast<elm_t *> (txmalloc (nalloc * sizeof (elm_t))));
|
|
limp = basep + nalloc;
|
|
- bfree (obasep);
|
|
+ this->bfree (obasep);
|
|
}
|
|
else
|
|
move (basep);
|