summaryrefslogtreecommitdiff
path: root/src/LuaBigInt.cc
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-09 19:23:48 -0700
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-09 19:23:48 -0700
commitbddaf98342a461f4e02389d4db390098fb423fbf (patch)
tree30e472aa10754b2c93a24a3519387b766e814907 /src/LuaBigInt.cc
parent032872bf6f7c14b0fdbc9cd75daae56bbeb50af0 (diff)
Fixing even more warnings.
Diffstat (limited to 'src/LuaBigInt.cc')
-rw-r--r--src/LuaBigInt.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/LuaBigInt.cc b/src/LuaBigInt.cc
index b608afd..c02ef11 100644
--- a/src/LuaBigInt.cc
+++ b/src/LuaBigInt.cc
@@ -139,7 +139,7 @@ int sLua_BigInt::BigInt_proceed_static(Lua & L, int n, int caller) {
a = new BigInt();
s = L.tostring(1);
if (n == 2)
- radix = L.tonumber(-1);
+ radix = (int) L.tonumber(-1);
a->set(s, radix);
} else if (n == 1) {
if (L.istable()) {
@@ -178,7 +178,7 @@ int sLua_BigInt::BigInt_proceed(Lua & L, int n, BigInt * a, int caller) {
if (L.type() == LUA_TSTRING) {
s = L.tostring(2);
if (n == 3)
- radix = L.tonumber(-1);
+ radix = (int) L.tonumber(-1);
a->set(s, radix);
} else {
lua_Number f = L.tonumber();
@@ -187,11 +187,11 @@ int sLua_BigInt::BigInt_proceed(Lua & L, int n, BigInt * a, int caller) {
r = 0;
break;
case BIGINT_SET2EXPT:
- a->set2expt(L.tonumber());
+ a->set2expt((int) L.tonumber());
break;
case BIGINT_TOSTRING:
if (n == 3)
- radix = L.tonumber(-1);
+ radix = (int) L.tonumber(-1);
L.push(a->toString(radix));
r = 1;
break;
@@ -245,7 +245,7 @@ int sLua_BigInt::BigInt_proceed(Lua & L, int n, BigInt * a, int caller) {
LuaBigIntFactory cf(c = new BigInt());
cf.pushDestruct(L);
}
- *c = *a << L.tonumber();
+ *c = *a << (unsigned int) L.tonumber();
r = 1;
break;
case BIGINT_SHR:
@@ -253,7 +253,7 @@ int sLua_BigInt::BigInt_proceed(Lua & L, int n, BigInt * a, int caller) {
LuaBigIntFactory cf(c = new BigInt());
cf.pushDestruct(L);
}
- *c = *a >> L.tonumber();
+ *c = *a >> (unsigned int) L.tonumber();
r = 1;
break;
case BIGINT_DO_ADD:
@@ -277,10 +277,10 @@ int sLua_BigInt::BigInt_proceed(Lua & L, int n, BigInt * a, int caller) {
*a %= *b;
break;
case BIGINT_DO_SHL:
- *a <<= L.tonumber();
+ *a <<= (unsigned int) L.tonumber();
break;
case BIGINT_DO_SHR:
- *a >>= L.tonumber();
+ *a >>= (unsigned int) L.tonumber();
break;
case BIGINT_UNM:
{