MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / tableFindValue

Function tableFindValue

src/builtin/module_builtin_rtti.cpp:1575–1581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1573
1574 template <typename KeyType>
1575 int32_t tableFindValue ( Table * tab, vec4f _key, int32_t valueTypeSize, Context * context ) {
1576 auto key = cast<KeyType>::to(_key);
1577 TableHash<KeyType> thh(context,valueTypeSize);
1578 auto hfn = hash_function(*context, key);
1579 // TODO Phase 4: surface as `long_rtti_get_value_pointer` and panic from int form on >INT_MAX.
1580 return (int32_t) thh.find(*tab, key, hfn);
1581 }
1582
1583 int32_t rtti_getTablePtr ( void * _table, vec4f key, Type baseType, int valueTypeSize, Context * context, LineInfoArg * at ) {
1584 Table * tab = (Table *) _table;

Callers

nothing calls this directly

Calls 3

toFunction · 0.85
hash_functionFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected