MCPcopy Create free account
hub / github.com/crownengine/crown / source_dir

Method source_dir

src/resource/data_compiler.cpp:755–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

753}
754
755void DataCompiler::source_dir(const char *resource_name, DynamicString &source_dir)
756{
757 const char *slash = strchr(resource_name, '/');
758
759 TempAllocator256 ta;
760 DynamicString source_name(ta);
761
762 if (slash != NULL)
763 source_name.set(resource_name, u32(slash - resource_name));
764 else
765 source_name.set("", 0);
766
767 DynamicString deffault(ta);
768 DynamicString empty(ta);
769 empty = "";
770
771 deffault = hash_map::get(_source_dirs, empty, empty);
772 source_dir = hash_map::get(_source_dirs, source_name, deffault);
773}
774
775void DataCompiler::add_ignore_glob(const char *glob)
776{

Callers 4

file_existsMethod · 0.80
readMethod · 0.80
read_optionalMethod · 0.80
absolute_pathMethod · 0.80

Calls 3

strchrFunction · 0.85
getFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected