Nothing, as long as you remove the code if you stop needing to do that and that only. . .and remember (or document) that it's there so that if someone else is using that code and needs to do something similar they won't hardcode yet something else that could've used what you hardcoded with just a little modification.
whats wrong with hardcoding when all you need to do is that and that only?