Merge pull request #199 from borglab/fix/segfaults-in-x32
fix Key as size_t (Closes #182)release/4.3a0
commit
76ff65f249
|
@ -115,8 +115,11 @@ void KeyInfo::initialize(const GaussianFactorGraph &fg) {
|
||||||
size_t start = 0;
|
size_t start = 0;
|
||||||
|
|
||||||
for (size_t i = 0; i < n; ++i) {
|
for (size_t i = 0; i < n; ++i) {
|
||||||
const size_t key = ordering_[i];
|
const Key key = ordering_[i];
|
||||||
const size_t dim = colspec.find(key)->second;
|
const auto it_key = colspec.find(key);
|
||||||
|
if (it_key==colspec.end())
|
||||||
|
throw std::runtime_error("KeyInfo: Inconsistency in key-dim map");
|
||||||
|
const size_t dim = it_key->second;
|
||||||
this->emplace(key, KeyInfoEntry(i, dim, start));
|
this->emplace(key, KeyInfoEntry(i, dim, start));
|
||||||
start += dim;
|
start += dim;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue