simpler this way
Signed-off-by: Kefu Chai <kchai@redhat.com>
}
if (type == Option::TYPE_INT) {
- int64_t f = strict_si_cast<int64_t>(val.c_str(), error_message);
+ int64_t f = strict_si_cast<int64_t>(val, error_message);
if (!error_message->empty()) {
return -EINVAL;
}
*out = f;
} else if (type == Option::TYPE_UINT) {
- uint64_t f = strict_si_cast<uint64_t>(val.c_str(), error_message);
+ uint64_t f = strict_si_cast<uint64_t>(val, error_message);
if (!error_message->empty()) {
return -EINVAL;
}
"csum_min_block",
};
if (count(begin(si_options), end(si_options), var)) {
- n = strict_si_cast<int64_t>(val.c_str(), &interr);
+ n = strict_si_cast<int64_t>(val, &interr);
} else if (count(begin(iec_options), end(iec_options), var)) {
n = strict_iec_cast<int64_t>(val, &interr);
} else {