The solution is to change the loadTexture function. The following should do the trick:
void TextureManager::loadTexture(const std::string& name, const std::string& filename) {
/* Create the texture in the std::map, then load the texture */
textures.emplace(name, sf::Texture());
this->textures[name].loadFromFile(filename);
return;
}
The solution is to change the loadTexture function. The following should do the trick: