diff --git a/lib/share/codec/InfoCodec.cc b/lib/share/codec/InfoCodec.cc index e9a2e48..99ec840 100644 --- a/lib/share/codec/InfoCodec.cc +++ b/lib/share/codec/InfoCodec.cc @@ -301,13 +301,13 @@ InfoCodec::setUInt(Key &key, const unsigned int setVal, unsigned int *setTarget) void InfoCodec::setInt64(Key &key, const int64_t setVal, int64_t *setTarget) // MTsafe { - mImpl->set(key, (long long)setVal, (long long *)setTarget); + mImpl->set(key, (Json::Int64)setVal, (Json::Int64 *)setTarget); } void InfoCodec::setUInt64(Key &key, const uint64_t setVal, uint64_t *setTarget) // MTsafe { - mImpl->set(key, (unsigned long long)setVal, (unsigned long long *)setTarget); + mImpl->set(key, (Json::UInt64)setVal, (Json::UInt64 *)setTarget); } void diff --git a/lib/share/codec/InfoRec.cc b/lib/share/codec/InfoRec.cc index 7af5f66..fa7061c 100644 --- a/lib/share/codec/InfoRec.cc +++ b/lib/share/codec/InfoRec.cc @@ -81,7 +81,7 @@ InfoRecGlobal::setDispatch(const std::string& hostName, { mArray["dp"]["name"] = hostName; mArray["dp"]["cpu"] = cpuTotal; - mArray["dp"]["mem"] = static_cast(memTotal); + mArray["dp"]["mem"] = (Json::UInt64)memTotal; } bool @@ -101,7 +101,7 @@ InfoRecGlobal::setMcrt(const int machineId, std::string mIdStr = mIdStrGen(machineId); mArray["mc"][mIdStr]["name"] = hostName; mArray["mc"][mIdStr]["cpu"] = cpuTotal; - mArray["mc"][mIdStr]["mem"] = static_cast(memTotal); + mArray["mc"][mIdStr]["mem"] = (Json::UInt64)memTotal; } size_t @@ -124,7 +124,7 @@ InfoRecGlobal::setMerge(const std::string& hostName, { mArray["mg"]["name"] = hostName; mArray["mg"]["cpu"] = cpuTotal; - mArray["mg"]["mem"] = static_cast(memTotal); + mArray["mg"]["mem"] = (Json::UInt64)memTotal; } std::string @@ -567,7 +567,7 @@ void InfoRecItem::setTimeStamp() { mTimeStamp = MiscUtil::getCurrentMicroSec(); - mArray["time"] = (unsigned long long)(mTimeStamp); + mArray["time"] = (Json::UInt64)(mTimeStamp); } int