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

Method ConvertDateString

source/common/rga_shared_utils.cpp:31–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29// *** INTERNALLY LINKED SYMBOLS - END ***
30
31bool RgaSharedUtils::ConvertDateString(std::string& date_string)
32{
33 bool ret = false;
34
35#ifdef _WIN32
36
37 bool is_conversion_required = (date_string != kStrRgaBuildDateDev);
38
39 // Convert Windows date format to "YYYY-MM-DD".
40 if (is_conversion_required)
41 {
42 ret = (date_string.find('/') != std::string::npos && date_string.size() == kWindowsDateStringLength);
43 if (ret)
44 {
45 date_string = date_string.substr(kWindowsDateStringMonthOffset, 2) + "/" +
46 date_string.substr(kWindowsDateStringDayOffset, 2) + "/" +
47 date_string.substr(kWindowsDateStringYearOffset, 4);
48 }
49 else
50 {
51 // We shouldn't get here.
52 assert(false);
53 }
54 }
55
56 // If a conversion is not required, this is really a success.
57 ret = (!is_conversion_required || ret);
58
59#else
60 // Conversion is only required on Windows.
61 ret = true;
62#endif // !_WIN32
63
64 return ret;
65}
66
67// Compares two paths, based on ignored case and with standardized path separators.
68// Returns true if the paths match; false otherwise.

Callers

nothing calls this directly

Calls 3

substrMethod · 0.80
findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected