You're right, that constant is used in a function called MoneyRange which seems to be mainly used to check transaction size. Where is the total supply actually limited in the original bitcoin code?
Edit: Actually I see it is just based upon the subsidy being cut in half in the code every 210,000 blocks. Interesting I just always assumed that constant was responsible.
nSubsidy >>= (nHeight / 210000);
You're right, there isn't a hard limit on the amount of bitcoins. 21 million is just rough level at which new Bitcoins generate per block is effectively negligible.
To make it clearer, this is what actually happens
1st "Stage": 50 BTC per block
2nd Stage : 25 BTC per block
3rd Stage : 12.5 BTC per block
4th Stage : 6.25 BTC per block
5th Stage : 3.125 BTC per block
6th Stage : 1.5625 BTC per block
So it just gets smaller and smaller so total Bitcoins would never reach the next million.