- Switched to a genericly extensible representation for userinfo.
- Fixed: The playerinfo CCMD did not range check the player number. SVN r4253 (trunk)
This commit is contained in:
parent
404df07629
commit
2668988870
37 changed files with 744 additions and 429 deletions
31
src/tarray.h
31
src/tarray.h
|
|
@ -468,6 +468,37 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//
|
||||
// TransferFrom
|
||||
//
|
||||
// Moves the contents from one TMap to another, leaving the TMap moved
|
||||
// from empty.
|
||||
//
|
||||
//=======================================================================
|
||||
|
||||
void TransferFrom(TMap &o)
|
||||
{
|
||||
// Clear all our nodes.
|
||||
NumUsed = 0;
|
||||
ClearNodeVector();
|
||||
|
||||
// Copy all of o's nodes.
|
||||
Nodes = o.Nodes;
|
||||
LastFree = o.LastFree;
|
||||
Size = o.Size;
|
||||
NumUsed = o.NumUsed;
|
||||
|
||||
// Tell o it doesn't have any nodes.
|
||||
o.Nodes = NULL;
|
||||
o.Size = 0;
|
||||
o.LastFree = NULL;
|
||||
o.NumUsed = 0;
|
||||
|
||||
// Leave o functional with one empty node.
|
||||
o.SetNodeVector(1);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//
|
||||
// Clear
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue