mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 11:31:51 +01:00
ndb - bug#18295
rewrite/clean up code a bit to avoid a gcc4 compiler bug
This commit is contained in:
parent
ae1bb1bd09
commit
4164c2a0e0
3 changed files with 20 additions and 15 deletions
|
@ -312,15 +312,16 @@ inline
|
|||
void
|
||||
DLFifoListImpl<P,T,U>::release()
|
||||
{
|
||||
Ptr<T> p;
|
||||
while(head.firstItem != RNIL)
|
||||
Ptr<T> ptr;
|
||||
Uint32 curr = head.firstItem;
|
||||
while(curr != RNIL)
|
||||
{
|
||||
p.i = head.firstItem;
|
||||
p.p = thePool.getPtr(head.firstItem);
|
||||
T * t = p.p;
|
||||
head.firstItem = t->U::nextList;
|
||||
release(p);
|
||||
thePool.getPtr(ptr, curr);
|
||||
curr = ptr.p->U::nextList;
|
||||
thePool.release(ptr);
|
||||
}
|
||||
head.firstItem = RNIL;
|
||||
head.lastItem = RNIL;
|
||||
}
|
||||
|
||||
template <typename P, typename T, typename U>
|
||||
|
|
|
@ -332,13 +332,15 @@ void
|
|||
DLListImpl<P,T,U>::release()
|
||||
{
|
||||
Ptr<T> ptr;
|
||||
while((ptr.i = head.firstItem) != RNIL)
|
||||
Uint32 curr = head.firstItem;
|
||||
while(curr != RNIL)
|
||||
{
|
||||
thePool.getPtr(ptr);
|
||||
head.firstItem = ptr.p->U::nextList;
|
||||
thePool.getPtr(ptr, curr);
|
||||
curr = ptr.p->U::nextList;
|
||||
thePool.release(ptr);
|
||||
}
|
||||
}
|
||||
head.firstItem = RNIL;
|
||||
}
|
||||
|
||||
template <typename P, typename T, typename U>
|
||||
inline
|
||||
|
|
|
@ -302,13 +302,15 @@ void
|
|||
SLListImpl<P, T, U>::release()
|
||||
{
|
||||
Ptr<T> ptr;
|
||||
while((ptr.i = head.firstItem) != RNIL)
|
||||
Uint32 curr = head.firstItem;
|
||||
while(curr != RNIL)
|
||||
{
|
||||
thePool.getPtr(ptr);
|
||||
head.firstItem = ptr.p->U::nextList;
|
||||
thePool.getPtr(ptr, curr);
|
||||
curr = ptr.p->U::nextList;
|
||||
thePool.release(ptr);
|
||||
}
|
||||
}
|
||||
head.firstItem = RNIL;
|
||||
}
|
||||
|
||||
template <typename P, typename T, typename U>
|
||||
inline
|
||||
|
|
Loading…
Add table
Reference in a new issue