This is my line of code:
absoluteTransform = states.transform *= this->getTransform();
states is of type sf::RenderStates.
"this" is a pointer to an object that inherits from sf::Transformable
my error is
passing 'const sf::Transform' as 'this' argument of 'sf::Transform& sf::Transform::operator=(const sf::Transform&)' discards qualifiers
I feel like I am missing something fundamental that should be obvious to me. I read the API for transform and the sf::Transform::operator= isn't even defined! Yet, this error is telling me that this operator is defined!
I know what I want to do. I want to store the states.transform for future reference. I just don't know how. I know that "qualifiers" refers to the const-ness of the argument but I don't understand how that is relevant or how it could be relevant. It would be easier if I knew for a fact that I could overwrite the state of one Transform with the state of another, but I am unsure if I can even do that because there is nothing in the API that would suggest that I can. And yet, if I cannot, then I cannot store any Transform and that seems absurd.
In case you are wondering why I need to store it in the first place, I don't think that is relevant to the discussion here because I am not looking for any workaround. If I really can't store an arbitrary transform then something is very wrong with my understanding and a workaround won't fix that.