mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
Get rid of decomposition declarations in couple of places to support older compilers.
This commit is contained in:
@@ -109,7 +109,10 @@ bool buildMSTPrim(int numNodes,
|
||||
|
||||
while (!pq.empty())
|
||||
{
|
||||
auto [w, u, v] = pq.top();
|
||||
HeapElem he = pq.top();
|
||||
double w = std::get<0>(he);
|
||||
int u = std::get<1>(he);
|
||||
int v = std::get<2>(he);
|
||||
pq.pop();
|
||||
|
||||
if (inMST[v])
|
||||
|
||||
@@ -533,8 +533,11 @@ void PoseGraphImpl::applyMST(const std::vector<cv::MSTEdge>& resultingEdges, con
|
||||
if (it == adj.end())
|
||||
continue;
|
||||
|
||||
for (const auto& [neighbor, relativePose] : it->second)
|
||||
for (const auto& pr : it->second)
|
||||
{
|
||||
auto neighbor = pr.first;
|
||||
auto relativePose = pr.second;
|
||||
|
||||
if (visited.count(neighbor))
|
||||
continue;
|
||||
newPoses[neighbor] = currentPose * relativePose;
|
||||
@@ -543,8 +546,11 @@ void PoseGraphImpl::applyMST(const std::vector<cv::MSTEdge>& resultingEdges, con
|
||||
}
|
||||
|
||||
// Apply the new poses
|
||||
for (const auto& [nodeId, pose] : newPoses)
|
||||
for (const auto& np : newPoses)
|
||||
{
|
||||
auto nodeId = np.first;
|
||||
auto pose = np.second;
|
||||
|
||||
if (!nodes.at(nodeId).isFixed)
|
||||
nodes.at(nodeId).setPose(pose.getAffine());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user