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

Method GetDataSize

linux/registry.cpp:399–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399int CRegistry::GetDataSize(const char *record) {
400 if (!currentkey)
401 return false;
402 tRecord *curr;
403 curr = currentkey->records;
404 while (curr) {
405 if (!strcasecmp(record, curr->name)) {
406 // found the record
407 switch (curr->type) {
408 case REGT_STRING:
409 return strlen((char *)curr->data) + 1;
410 break;
411 case REGT_DWORD:
412 return sizeof(int);
413 break;
414 };
415 return 0;
416 }
417 curr = curr->next;
418 }
419 return 0;
420}
421
422bool CRegistry::CreateRecord(const char *name, char type, void *data) {
423 if (!currentkey)

Callers 1

readMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected