cmdopt: use util's implementation of pow

This commit is contained in:
Danny Robson 2015-11-13 17:59:58 +11:00
parent b6a4166c68
commit 8f806b5fa8

View File

@ -252,27 +252,27 @@ suffix_to_multiplier (char c)
switch (c) { switch (c) {
case 'e': case 'e':
case 'E': case 'E':
return pow (1024UL, 6); return util::pow (1024UL, 6);
case 'p': case 'p':
case 'P': case 'P':
return pow (1024UL, 5); return util::pow (1024UL, 5);
case 't': case 't':
case 'T': case 'T':
return pow (1024UL, 4); return util::pow (1024UL, 4);
case 'g': case 'g':
case 'G': case 'G':
return pow (1024UL, 3); return util::pow (1024UL, 3);
case 'm': case 'm':
case 'M': case 'M':
return pow (1024UL, 2); return util::pow (1024UL, 2);
case 'k': case 'k':
case 'K': case 'K':
return pow (1024UL, 1); return util::pow (1024UL, 1);
default: default:
throw util::cmdopt::invalid_value ("bytes"); throw util::cmdopt::invalid_value ("bytes");