MCPcopy Create free account
hub / github.com/GPUOpen-Tools/radeon_gpu_analyzer / ComparePaths

Method ComparePaths

source/common/rga_shared_utils.cpp:69–79  ·  view source on GitHub ↗

Compares two paths, based on ignored case and with standardized path separators. Returns true if the paths match; false otherwise.

Source from the content-addressed store, hash-verified

67// Compares two paths, based on ignored case and with standardized path separators.
68// Returns true if the paths match; false otherwise.
69bool RgaSharedUtils::ComparePaths(const std::string& path1, const std::string& path2)
70{
71 std::string p1_lower = path1;
72 std::string p2_lower = path2;
73
74 // Make both paths lowercase and with forward slashes.
75 std::transform(p1_lower.begin(), p1_lower.end(), p1_lower.begin(), [](unsigned char c) { return static_cast<unsigned char>((c == '\\') ? '/' : std::tolower(c)); });
76 std::transform(p2_lower.begin(), p2_lower.end(), p2_lower.begin(), [](unsigned char c) { return static_cast<unsigned char>((c == '\\') ? '/' : std::tolower(c)); });
77
78 return (p1_lower == p2_lower);
79}
80
81// Get current system time.
82static bool CurrentTime(struct tm& time_data)

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected