-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPos2HelpersInline.h
52 lines (44 loc) · 1 KB
/
Pos2HelpersInline.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright Chris Welty
// All Rights Reserved
// This file is distributed subject to GNU GPL version 2. See the files
// Copying.txt and GPL.txt for details.
#pragma once
#include "Pos2Helpers.h"
#include "Debug.h"
///////////////////////////////////////////////////////////////////////////////
// CEmList routines
///////////////////////////////////////////////////////////////////////////////
inline void CEmpty::Remove() {
prev->next=next;
#if CIRCULAR_EMPTIES
next->prev=prev;
#else
if (next)
next->prev=prev;
#endif
}
inline void CEmpty::Add() {
prev->next=this;
#if CIRCULAR_EMPTIES
next->prev=this;
#else
if (next)
next->prev=this;
#endif
}
inline void CEmpty::RemoveParity() {
prev->next=next;
if (next)
next->prev=prev;
#if PARITY_USAGE
holeParity^=holeMask;
#endif
}
inline void CEmpty::AddParity() {
prev->next=this;
if (next)
next->prev=this;
#if PARITY_USAGE
holeParity^=holeMask;
#endif
}