mirror of https://gitee.com/bigwinds/arangodb
use 'list' in plural names
This commit is contained in:
parent
6609512297
commit
6d3753f7ca
|
@ -139,22 +139,22 @@ RangeInfo::RangeInfo (triagens::basics::Json const& json)
|
||||||
_defined(true),
|
_defined(true),
|
||||||
_equality(basics::JsonHelper::checkAndGetBooleanValue(json.json(), "equality")) {
|
_equality(basics::JsonHelper::checkAndGetBooleanValue(json.json(), "equality")) {
|
||||||
|
|
||||||
triagens::basics::Json lows = json.get("lows");
|
triagens::basics::Json jsonLowList = json.get("lows");
|
||||||
if (! lows.isList()) {
|
if (! jsonLowList.isList()) {
|
||||||
THROW_INTERNAL_ERROR("low attribute must be a list");
|
THROW_INTERNAL_ERROR("low attribute must be a list");
|
||||||
}
|
}
|
||||||
triagens::basics::Json highs = json.get("highs");
|
triagens::basics::Json jsonHighList = json.get("highs");
|
||||||
if (! highs.isList()) {
|
if (! jsonHighList.isList()) {
|
||||||
THROW_INTERNAL_ERROR("high attribute must be a list");
|
THROW_INTERNAL_ERROR("high attribute must be a list");
|
||||||
}
|
}
|
||||||
// If an exception is thrown from within these loops, then the
|
// If an exception is thrown from within these loops, then the
|
||||||
// vectors _low and _high will be destroyed properly, so no
|
// vectors _low and _high will be destroyed properly, so no
|
||||||
// try/catch is needed.
|
// try/catch is needed.
|
||||||
for (size_t i = 0; i < lows.size(); i++) {
|
for (size_t i = 0; i < jsonLowList.size(); i++) {
|
||||||
_lows.emplace_back(lows.at(static_cast<int>(i)));
|
_lows.emplace_back(jsonLowList.at(static_cast<int>(i)));
|
||||||
}
|
}
|
||||||
for (size_t i = 0; i < highs.size(); i++) {
|
for (size_t i = 0; i < jsonHighList.size(); i++) {
|
||||||
_highs.emplace_back(highs.at(static_cast<int>(i)));
|
_highs.emplace_back(jsonHighList.at(static_cast<int>(i)));
|
||||||
}
|
}
|
||||||
_lowConst.assign(json.get("lowConst"));
|
_lowConst.assign(json.get("lowConst"));
|
||||||
_highConst.assign(json.get("highConst"));
|
_highConst.assign(json.get("highConst"));
|
||||||
|
|
Loading…
Reference in New Issue