You can just compare `soundPath` with `oldSoundPath`. There's no need to create a temporary `std::string`. If you're comparing for equality, just use the `==` operator; just make sure the `std::string` operand is in the left side.