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

Method MinorVersion

lib/mdflib/mdflib/src/idblock.cpp:152–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void IdBlock::MinorVersion(int minor) {
153 const int major = format_identifier_.empty()
154 ? 4
155 : std::stoi(format_identifier_.substr(0, 1));
156 if (minor <= 0) {
157 minor = 0;
158 } else if (minor < 10) {
159 minor *= 10;
160 } else if (minor >= 100) {
161 minor %= 100;
162 }
163
164 std::ostringstream temp;
165 temp << major << ".";
166 if (minor <= 0) {
167 temp << "00";
168 } else {
169 temp << minor;
170 }
171 format_identifier_ = temp.str();
172 version_ = 100 * major + minor;
173}
174
175void IdBlock::IsFinalized(bool finalized, std::streambuf& buffer,
176 uint16_t standard_flags, uint16_t custom_flags) {

Callers 4

TESTFunction · 0.45
getMethod · 0.45
setMethod · 0.45
EXPORTFEATUREFUNCFunction · 0.45

Calls 1

emptyMethod · 0.80

Tested by 1

TESTFunction · 0.36