gtorrent / gtorrent-core

Core library of gTorrent which handles everything but UI/UX
GNU General Public License v3.0
39 stars 12 forks source link

Update getFileSizeString() #49

Closed iitalics closed 10 years ago

iitalics commented 10 years ago

The "setprecision()" call used to do nothing because we printed integers (converts to doubles now). Manually expanding multiplication only removes readability, the compiler will do these simple optimizations. "else if" is exponentially more clean than the old "if"s. Also fixed (eg "3.100 GB") looks messier than without fixed (eg "3.1 GB")

infoburp commented 10 years ago

please update to match my latest merged pull (current master)

benwaffle commented 10 years ago

I like this the best. Should we close the other getFileSizeString() PRs?

fuyukaidesu commented 10 years ago

I liked andrew's the best but since he won't fix his merge I'll merge this and close the other two. Seriously why do we have 3 PR for a fucking function ?