I have chained methods like that:
PureCommand Hasher::nameToPure(CommandName& commandName) {
return this->commandHash.find(commandName).value();
}
ByteCommand Hasher::nameToByte(CommandName& commandName) {
return this->pureToByte(this->nameToPure(commandName));
}
The 2nd method is passing commandName which is wrong type as the 1st method needs reference, not an object. Then I've tried this:
ByteCommand Hasher::nameToByte(CommandName& commandName) {
return this->pureToByte(this->nameToPure(*&commandName));
}
as stated here: How to cast/convert pointer to reference in C++ - because &commandName gives me pointer... but it's passing an object again. What am I doing the silly way? As probably it's something trivial...