MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / AddItem

Method AddItem

editor/ScriptSyncDialog.cpp:116–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116int CMyListCtrl::AddItem(char *name, int num) {
117 int item_count = GetItemCount();
118
119 int added = InsertItem(item_count, name);
120 if (added == -1) {
121 return -1;
122 }
123
124 bool ret = CMyListCtrl::SetItem(added, num);
125
126 if (!ret) {
127 DeleteItem(added);
128 return -1;
129 }
130
131 // all went ok
132 return added;
133}
134
135bool CMyListCtrl::GetItem(int item, char *name, char *state) {
136 int item_count = GetItemCount();

Callers 1

DoStuffMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected