casts in example parser
Issue #34
new
I run into implausible system variable values when i called the example parser on a blf file recorded with original Vector tools. I think the casts used in the code (like the following) is not working as it might be intended to work.
void show(Vector::BLF::SystemVariable * obj) {
[...]
case Vector::BLF::SystemVariable::Type::Double:
[...]
std::cout << " data=" << std::fixed << static_cast<double>(*obj->data.data());
I don't know how a clean C++ solution looks, i used the old C memcpy style (coping the data into a double var) and with this workaround the values are OK.
Maybe similar casts are used somewhere else.
Comments (2)
-
repo owner -
repo owner -
assigned issue to
-
assigned issue to
- Log in to comment
Probably I can add methods to access the SystemVariables and EnvVariables in the proper types. So doing the static_cast internally with some safety measures to ensure that the type is actually correct.