MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / Number

Method Number

lib/mdflib/mdflib/src/mdnumber.cpp:116–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115template <>
116void MdNumber::Number(uint64_t value) {
117 try {
118 switch (data_type_) {
119 case MdDataType::MdHex: {
120 char temp[30] = {};
121 std::snprintf(temp, sizeof(temp), "0x%llX", static_cast<unsigned long long>(value));
122 number_ = temp;
123 break;
124 }
125
126 default:
127 number_ = std::to_string(value);
128 break;
129 }
130 } catch (const std::exception&) {
131 number_.clear();
132 }
133}
134
135template <>
136uint64_t MdNumber::Number() const {

Callers 3

TEST_FFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 3

emptyMethod · 0.80
clearMethod · 0.45
sizeMethod · 0.45

Tested by 3

TEST_FFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36