-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfp_pathmanager.cpp
More file actions
20 lines (18 loc) · 808 Bytes
/
fp_pathmanager.cpp
File metadata and controls
20 lines (18 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "fp_plugclass.h"
#include "fp_pathmanager.h"
TPathIndexList AddPathIndexToList(TPathIndex Index, TPathIndexList List) { return (List | (1 << Index)); };
TPathIndexList RemovePathIndexFromList(TPathIndex Index, TPathIndexList List) { return (List & ~(1 << Index)); };
bool IsPathIndexInList(TPathIndex Index, TPathIndexList List) { return (List & (1 << Index) == (1 << Index)); };
TPathIndexList ConvertPathIndexToList(TPathIndex Index)
{
if (Index == NoPathIndexConst)
return 0;
else
return (1 << Index);
};
intptr_t ComposeSearchDirListTag(TPathIndex PathIndex, int ListIndex) { return (((PathIndex & 0xFF) << 24) | (ListIndex & 0xFFFFFF)); };
void DecomposeSearchDirListTag(intptr_t Tag, TPathIndex& PathIndex, int& ListIndex)
{
PathIndex = ((Tag >> 24) & 0xFF);
ListIndex = (Tag & 0xFFFFFF);
};