Skip to content

Commit 00c727d

Browse files
committed
Reformat: xrServerEntities
1 parent 6852d9d commit 00c727d

File tree

109 files changed

+13860
-14267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+13860
-14267
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#pragma once
22

3-
43
typedef shared_str INFO_DATA;
54
DEFINE_VECTOR(INFO_DATA, KNOWN_INFO_VECTOR, KNOWN_INFO_VECTOR_IT);
65

76
class CFindByIDPred
87
{
98
public:
10-
CFindByIDPred(shared_str element_to_find) {element = element_to_find;}
11-
IC bool operator () (const INFO_DATA& data) const {return data == element;}
9+
CFindByIDPred(shared_str element_to_find) { element = element_to_find; }
10+
IC bool operator()(const INFO_DATA& data) const { return data == element; }
1211
private:
13-
shared_str element;
12+
shared_str element;
1413
};

src/xrServerEntities/ItemListTypes.h

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,56 @@
44

55
//---------------------------------------------------------------------------
66

7-
class ListItem{
8-
friend class CListHelper;
9-
friend class TItemList;
10-
shared_str key;
11-
int type;
12-
void* item;
13-
public:
14-
typedef fastdelegate::FastDelegate1<ListItem*> TOnListItemFocused;
15-
typedef fastdelegate::FastDelegate1<ListItem*> TOnClick;
16-
TOnClick OnClickEvent;
17-
TOnListItemFocused OnItemFocused;
18-
TOnDrawThumbnail OnDrawThumbnail;
7+
class ListItem
8+
{
9+
friend class CListHelper;
10+
friend class TItemList;
11+
shared_str key;
12+
int type;
13+
void* item;
14+
1915
public:
20-
int tag;
21-
LPVOID m_Object;
22-
int icon_index;
23-
u32 prop_color;
16+
typedef fastdelegate::FastDelegate1<ListItem*> TOnListItemFocused;
17+
typedef fastdelegate::FastDelegate1<ListItem*> TOnClick;
18+
TOnClick OnClickEvent;
19+
TOnListItemFocused OnItemFocused;
20+
TOnDrawThumbnail OnDrawThumbnail;
21+
2422
public:
25-
enum{
26-
flShowCB = (1<<0),
27-
flCBChecked = (1<<1),
28-
flDrawThumbnail = (1<<2),
29-
flDrawCanvas = (1<<3),
30-
flSorted = (1<<4),
31-
flHidden = (1<<5),
32-
};
33-
Flags32 m_Flags;
23+
int tag;
24+
LPVOID m_Object;
25+
int icon_index;
26+
u32 prop_color;
27+
3428
public:
35-
ListItem (int _type):type(_type),prop_color(0),item(0),key(0),tag(0),icon_index(-1),OnDrawThumbnail(0),OnItemFocused(0),m_Object(0){m_Flags.zero();}
36-
virtual ~ListItem (){};
37-
void SetName (LPCSTR _key){key=_key;}
29+
enum
30+
{
31+
flShowCB = (1 << 0),
32+
flCBChecked = (1 << 1),
33+
flDrawThumbnail = (1 << 2),
34+
flDrawCanvas = (1 << 3),
35+
flSorted = (1 << 4),
36+
flHidden = (1 << 5),
37+
};
38+
Flags32 m_Flags;
3839

39-
IC void Visible (BOOL val){m_Flags.set(flHidden, !val);}
40-
IC BOOL Visible () const{ return !m_Flags.test(flHidden);}
41-
IC int Type (){return type;}
42-
IC void* Item (){return item;}
43-
IC LPCSTR Key (){return *key;}
44-
IC void SetIcon (int index){icon_index=index;}
40+
public:
41+
ListItem(int _type)
42+
: type(_type), prop_color(0), item(0), key(0), tag(0), icon_index(-1), OnDrawThumbnail(0), OnItemFocused(0),
43+
m_Object(0)
44+
{
45+
m_Flags.zero();
46+
}
47+
virtual ~ListItem(){};
48+
void SetName(LPCSTR _key) { key = _key; }
49+
IC void Visible(BOOL val) { m_Flags.set(flHidden, !val); }
50+
IC BOOL Visible() const { return !m_Flags.test(flHidden); }
51+
IC int Type() { return type; }
52+
IC void* Item() { return item; }
53+
IC LPCSTR Key() { return *key; }
54+
IC void SetIcon(int index) { icon_index = index; }
4555
};
4656

47-
DEFINE_VECTOR (ListItem*,ListItemsVec,ListItemsIt);
57+
DEFINE_VECTOR(ListItem*, ListItemsVec, ListItemsIt);
4858
//---------------------------------------------------------------------------
4959
#endif
50-
51-
52-
53-

0 commit comments

Comments
 (0)