Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build errors with newer versions of jsoncpp #1

Open
wants to merge 1 commit into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/share/codec/InfoCodec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<long long>(key, (long long)setVal, (long long *)setTarget);
mImpl->set<Json::Int64>(key, (Json::Int64)setVal, (Json::Int64 *)setTarget);
}

void
InfoCodec::setUInt64(Key &key, const uint64_t setVal, uint64_t *setTarget) // MTsafe
{
mImpl->set<unsigned long long>(key, (unsigned long long)setVal, (unsigned long long *)setTarget);
mImpl->set<Json::UInt64>(key, (Json::UInt64)setVal, (Json::UInt64 *)setTarget);
}

void
Expand Down
8 changes: 4 additions & 4 deletions lib/share/codec/InfoRec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ InfoRecGlobal::setDispatch(const std::string& hostName,
{
mArray["dp"]["name"] = hostName;
mArray["dp"]["cpu"] = cpuTotal;
mArray["dp"]["mem"] = static_cast<unsigned long long>(memTotal);
mArray["dp"]["mem"] = (Json::UInt64)memTotal;
}

bool
Expand All @@ -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<unsigned long long>(memTotal);
mArray["mc"][mIdStr]["mem"] = (Json::UInt64)memTotal;
}

size_t
Expand All @@ -124,7 +124,7 @@ InfoRecGlobal::setMerge(const std::string& hostName,
{
mArray["mg"]["name"] = hostName;
mArray["mg"]["cpu"] = cpuTotal;
mArray["mg"]["mem"] = static_cast<unsigned long long>(memTotal);
mArray["mg"]["mem"] = (Json::UInt64)memTotal;
}

std::string
Expand Down Expand Up @@ -567,7 +567,7 @@ void
InfoRecItem::setTimeStamp()
{
mTimeStamp = MiscUtil::getCurrentMicroSec();
mArray["time"] = (unsigned long long)(mTimeStamp);
mArray["time"] = (Json::UInt64)(mTimeStamp);
}

int
Expand Down