TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Queue.h File Reference
#include "G3D/platform.h"
#include "G3D/System.h"
#include "G3D/debug.h"
+ Include dependency graph for Queue.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  G3D::Queue< T >
 

Namespaces

 G3D
 

Macros

#define FIND_ENDS
 

Detailed Description

Morgan McGuire, http://graphics.cs.williams.edu

2002-07-09 2008-12-20

Macro Definition Documentation

#define FIND_ENDS
Value:
int firstEnd = head + num;\
int secondEnd = 0;\
if (firstEnd > numAllocated) {\
secondEnd = firstEnd - numAllocated;\
firstEnd = numAllocated;\
}

Locate the indices of the break between of the two sections of the circular queue. These are used to construct two for loops that iterate over the whole sequence without using the modulo operator.

[0 ... secondEnd) [head .... firstEnd)

See also
ThreadsafeQueue