MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / CompareRootName

Function CompareRootName

system/lib/libcxx/src/filesystem/path.cpp:305–314  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////// path.comparisons

Source from the content-addressed store, hash-verified

303////////////////////////////////////////////////////////////////////////////
304// path.comparisons
305static int CompareRootName(PathParser* LHS, PathParser* RHS) {
306 if (!LHS->inRootName() && !RHS->inRootName())
307 return 0;
308
309 auto GetRootName = [](PathParser* Parser) -> string_view_t { return Parser->inRootName() ? **Parser : PATHSTR(""); };
310 int res = GetRootName(LHS).compare(GetRootName(RHS));
311 ConsumeRootName(LHS);
312 ConsumeRootName(RHS);
313 return res;
314}
315
316static int CompareRootDir(PathParser* LHS, PathParser* RHS) {
317 if (!LHS->inRootDir() && RHS->inRootDir())

Callers 1

__compareMethod · 0.85

Calls 3

ConsumeRootNameFunction · 0.85
inRootNameMethod · 0.80
compareMethod · 0.45

Tested by

no test coverage detected