gfan/gfan-odr.patch

83 lines
1.8 KiB
Diff
Raw Normal View History

2024-09-10 11:06:42 +02:00
From a75e670e0e228e0a738eb65c7128a01446b4135c Mon Sep 17 00:00:00 2001
From: Alois Wohlschlager <alois1@gmx-topmail.de>
Date: Sat, 3 Jul 2021 11:07:23 +0200
Subject: [PATCH] Fix ODR violations
Upstream: not reachable
Various traversal code reused class names (Boundary, pathStepRidge,
pathStepFacet) in violation of the one definition rule. Put the
respective classes into anonymous namespaces to comply with ODR.
---
2024-09-10 11:31:47 +02:00
src/gfanlib_traversal.cpp | 4 ++++
src/symmetrictraversal.cpp | 4 ++++
src/tropicaltraverse.cpp | 5 +++++
2024-09-10 11:06:42 +02:00
3 files changed, 13 insertions(+)
2024-09-10 11:31:47 +02:00
Index: gfan0.7/src/gfanlib_traversal.cpp
===================================================================
--- gfan0.7.orig/src/gfanlib_traversal.cpp
+++ gfan0.7/src/gfanlib_traversal.cpp
@@ -45,6 +45,8 @@ bool FanBuilder::process(FanTraverser &t
2024-09-10 11:06:42 +02:00
+namespace
+{
2024-09-10 11:31:47 +02:00
/**
* Classes
@@ -159,6 +161,8 @@ public:
}
2024-09-10 11:06:42 +02:00
};
+}
+
/**
2024-09-10 11:31:47 +02:00
Rewrite these comments.
Index: gfan0.7/src/symmetrictraversal.cpp
===================================================================
--- gfan0.7.orig/src/symmetrictraversal.cpp
+++ gfan0.7/src/symmetrictraversal.cpp
@@ -103,6 +103,8 @@ bool SymmetricTargetVertexSetBuilder::pr
2024-09-10 11:06:42 +02:00
in the computation is made these edges will be deleted.
*/
+namespace
+{
class Boundary
{
2024-09-10 11:31:47 +02:00
@@ -231,6 +233,8 @@ public:
}
2024-09-10 11:06:42 +02:00
};
+}
+
/**
2024-09-10 11:31:47 +02:00
Rewrite these comments.
Index: gfan0.7/src/tropicaltraverse.cpp
===================================================================
--- gfan0.7.orig/src/tropicaltraverse.cpp
+++ gfan0.7/src/tropicaltraverse.cpp
2024-09-10 11:06:42 +02:00
@@ -104,6 +104,9 @@ public:
}
};
+namespace
+{
+
/**
Rewrite these comments.
2024-09-10 11:31:47 +02:00
@@ -135,6 +138,8 @@ struct pathStepFacet
using namespace tropicalTraverseNamespace;
2024-09-10 11:06:42 +02:00
+}
+
/**
We need to simulate two mutually recursive functions. An actual
implementation of these two functions would propably not work since