MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / normalizeNativePath

Function normalizeNativePath

Libraries/Testing/Testing.cpp:234–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234static bool normalizeNativePath(StringSpan path, StringPath& normalizedPath)
235{
236#if SC_PLATFORM_WINDOWS
237 const DWORD length =
238 ::GetFullPathNameW(path.getNullTerminatedNative(), static_cast<DWORD>(StringPath::StorageCapacity),
239 normalizedPath.writableSpan().data(), nullptr);
240 return length > 0 and length < StringPath::StorageCapacity and normalizedPath.resize(length);
241#else
242 return normalizedPath.assign(path);
243#endif
244}
245
246static void recordAttempt(StartupAttempt* attempts, size_t maxAttempts, size_t& numAttempts, const char* source,
247 StringSpan candidate)

Callers 2

resolveLibraryRootFunction · 0.85

Calls 4

writableSpanMethod · 0.80
dataMethod · 0.45
resizeMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected