lurch towards const correctness
Merge pull request #1593 from WalterBright/b48

lurch towards const correctness