| 603 | } |
| 604 | |
| 605 | void ConsoleValue::setStringStackPtrValue(StringStackPtr ptrValue) |
| 606 | { |
| 607 | if(type <= ConsoleValue::TypeInternalString) |
| 608 | { |
| 609 | const char *value = StringStackPtrRef(ptrValue).getPtr(&STR); |
| 610 | if (bufferLen > 0) |
| 611 | { |
| 612 | dFree(sval); |
| 613 | bufferLen = 0; |
| 614 | } |
| 615 | |
| 616 | U32 stringLen = dStrlen(value); |
| 617 | if(stringLen < 256) |
| 618 | { |
| 619 | fval = dAtof(value); |
| 620 | ival = dAtoi(value); |
| 621 | } |
| 622 | else |
| 623 | { |
| 624 | fval = 0.f; |
| 625 | ival = 0; |
| 626 | } |
| 627 | |
| 628 | type = TypeInternalStringStackPtr; |
| 629 | sval = (char*)(value - STR.mBuffer); |
| 630 | bufferLen = 0; |
| 631 | } |
| 632 | else |
| 633 | { |
| 634 | const char *value = StringStackPtrRef(ptrValue).getPtr(&STR); |
| 635 | Con::setData(type, dataPtr, 0, 1, &value, enumTable); |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | S32 Dictionary::getIntVariable(StringTableEntry name, bool *entValid) |
| 640 | { |
no test coverage detected