| 622 | namespace mesh_cache |
| 623 | { |
| 624 | Mesh *get(MeshCache &cache, const char *path) |
| 625 | { |
| 626 | StringId64 path_id(path); |
| 627 | |
| 628 | ListNode *cur; |
| 629 | list_for_each(cur, &cache._meshes) |
| 630 | { |
| 631 | Mesh *mesh = (Mesh *)container_of(cur, Mesh, _cache_node); |
| 632 | |
| 633 | if (mesh->_path == path_id) |
| 634 | return mesh; |
| 635 | } |
| 636 | |
| 637 | return NULL; |
| 638 | } |
| 639 | |
| 640 | void add(MeshCache &cache, Mesh *mesh) |
| 641 | { |
no outgoing calls