From 2c8c3f2c9f3d474e17e51741348d9bc1060913db Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Wed, 7 Apr 2021 00:22:52 -0700 Subject: [PATCH] type fixes --- include/bank.hpp | 2 +- include/bank_f.hpp | 2 +- include/user.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/bank.hpp b/include/bank.hpp index 854fafb..ca4cf2f 100644 --- a/include/bank.hpp +++ b/include/bank.hpp @@ -101,7 +101,7 @@ public: return state; } - Json::Value::asInt64 GetBal(const std::string &name) const + int_fast64_t GetBal(const std::string &name) const { int_fast64_t res = -1; users.if_contains(name, [&res](const User &u) { diff --git a/include/bank_f.hpp b/include/bank_f.hpp index f12c689..b0c6511 100644 --- a/include/bank_f.hpp +++ b/include/bank_f.hpp @@ -21,7 +21,7 @@ INLINE Json::Value JsonReturn(T &&val) } else { - res["value"] = val; + res["value"] = (long)val; } return res; } diff --git a/include/user.hpp b/include/user.hpp index 186ba51..52b8f59 100644 --- a/include/user.hpp +++ b/include/user.hpp @@ -25,7 +25,7 @@ struct User Json::Value Serialize() const { Json::Value res; - res["balance"] = balance; + res["balance"] = (long)balance; res["password"] = password; return res; }