Skip to content

Commit

Permalink
Changes needed after upgrading mongo version from 4.0.4 to 4.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
simsekgokhan committed Jan 14, 2019
1 parent 49207c0 commit 6682ddc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/robomongo/core/HexUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace Robomongo

const char *p = s.c_str();
for (size_t i = 0; i < bytes; i++) {
data[i] = mongo::fromHex(p);
data[i] = mongo::fromHex(p).getValue();
p += 2;
}

Expand Down
6 changes: 3 additions & 3 deletions src/robomongo/shell/bson/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ Status JParse::binaryObject(StringData fieldName, BSONObjBuilder& builder) {
"byte");
}
builder.appendBinData(
fieldName, binData.length(), BinDataType(fromHex(binDataType)), binData.data());
fieldName, binData.length(), BinDataType(fromHex(binDataType).getValue()), binData.data());
return Status::OK();
}

Expand Down Expand Up @@ -1287,8 +1287,8 @@ Status JParse::chars(std::string* result, const char* terminalSet, const char* a
if (!isHexString(StringData(q, 4))) {
return parseError("Expecting 4 hex digits");
}
unsigned char first = fromHex(q);
unsigned char second = fromHex(q += 2);
unsigned char first = fromHex(q).getValue();
unsigned char second = fromHex(q += 2).getValue();
const std::string& utf8str = encodeUTF8(first, second);
for (unsigned int i = 0; i < utf8str.size(); i++) {
result->push_back(utf8str[i]);
Expand Down

0 comments on commit 6682ddc

Please sign in to comment.