MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / AsHex

Method AsHex

IntelPresentMon/CommonUtilities/log/ErrorCode.cpp:65–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 return IsResolved() && !pStrings_->type.empty();
64 }
65 std::string ErrorCode::AsHex() const
66 {
67 if (Empty()) {
68 return "---";
69 }
70 if (auto o = AsSigned()) {
71 if (Fits32()) {
72 return std::format("0x{:08X}", (uint32_t)*o);
73 }
74 else {
75 return std::format("0x{:016X}", (uint64_t)*o);
76 }
77 }
78 if (auto o = AsUnsigned()) {
79 if (Fits32()) {
80 return std::format("0x{:08X}", (uint32_t)*o);
81 }
82 else {
83 return std::format("0x{:016X}", (uint64_t)*o);
84 }
85 }
86 return "";
87 }
88 const IErrorCodeResolver::Strings* ErrorCode::GetStrings() const
89 {
90 return pStrings_.get();

Callers 2

FormatMethod · 0.80
FormatMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected