1
0
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:
Alexander Smorkalov
2025-12-01 11:05:50 +03:00
parent 65b2fa9c2b
commit f79fbfa51c
2 changed files with 12 additions and 3 deletions
+4 -1
View File
@@ -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])
+8 -2
View File
@@ -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());
}