I add an issue on reinterpreting a variable and I don't know why..
int ProgressBar(const uint64_t data_sent, const uint64_t data_total, void const *const data)
{
Dialog *dialog = reinterpret_cast<Dialog*> (data);
dialog->setValue((data_sent *100) / data_total);
}
the reinterpret_cast
seems not allowed and say
reinterpret_cast from 'const void *) to Dialog * casts away qualifiers
Any idea
reinterpret_cast
can't cast away cv-qualifiersconst
you put in there has no effect.const
here? That sounds unsafe.