MCPcopy Create free account
hub / github.com/SaschaWillems/HowToVulkan / JoinPath

Function JoinPath

source/external/tinyobj/tiny_obj_loader.h:2065–2078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2063}
2064
2065static std::string JoinPath(const std::string &dir,
2066 const std::string &filename) {
2067 if (dir.empty()) {
2068 return filename;
2069 } else {
2070 // check '/'
2071 char lastChar = *dir.rbegin();
2072 if (lastChar != '/') {
2073 return dir + std::string("/") + filename;
2074 } else {
2075 return dir + filename;
2076 }
2077 }
2078}
2079
2080void LoadMtl(std::map<std::string, int> *material_map,
2081 std::vector<material_t> *materials, std::istream *inStream,

Callers 1

operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected