MCPcopy Create free account
hub / github.com/bdring/FluidNC / uintValue

Method uintValue

FluidNC/src/Configuration/Parser.cpp:65–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 }
64
65 uint32_t Parser::uintValue() const {
66 auto token = string_util::trim(_token._value);
67 uint32_t uint_value;
68 if (string_util::from_decimal(token, uint_value)) {
69 return uint_value;
70 }
71
72 float float_value;
73 if (string_util::from_float(token, float_value)) {
74 return lroundf(float_value);
75 }
76
77 parseError("Expected an integer value");
78 return 0;
79 }
80
81 // cppcheck-suppress unusedFunction
82 float Parser::floatValue() const {

Callers 1

itemMethod · 0.80

Calls 3

from_decimalFunction · 0.85
from_floatFunction · 0.85
trimFunction · 0.50

Tested by

no test coverage detected