Fix FTBFS with gcc-10
authorDebian Games Team <pkg-games-devel@lists.alioth.debian.org>
Tue, 18 Aug 2020 09:48:00 +0000 (10:48 +0100)
committerVincent Cheng <vcheng@debian.org>
Tue, 18 Aug 2020 09:48:00 +0000 (10:48 +0100)
Origin: upstream, https://trac.wildfiregames.com/changeset/23794
Bug: https://trac.wildfiregames.com/ticket/5756
Bug-Debian: https://bugs.debian.org/956967

Gbp-Pq: Name fix-ftbfs-gcc-10.patch

libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FAXPhysicsExport.cpp
libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.h
source/simulation2/helpers/HierarchicalPathfinder.cpp
source/simulation2/helpers/HierarchicalPathfinder.h

index 9f2ab3e476438fae75a6984f8233e0840af6ddfa..41c5cc0df30c57f7987672e2a8b32269592c9176 100644 (file)
@@ -329,16 +329,3 @@ void FArchiveXML::WritePhysicsRigidBodyParameters(FCDPhysicsRigidBodyParameters*
                FArchiveXML::LetWriteObject(physicsRigidBodyParameters->GetPhysicsShape(i), techniqueNode);\r
        }\r
 }\r
-\r
-template <class TYPE, int QUAL>\r
-xmlNode* FArchiveXML::AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT<TYPE,QUAL>& value)\r
-{\r
-       xmlNode* paramNode = AddChild(parentNode, name);\r
-       AddContent(paramNode, FUStringConversion::ToString((TYPE&) value));\r
-       if (value.IsAnimated())\r
-       {\r
-               const FCDAnimated* animated = value.GetAnimated();\r
-               FArchiveXML::WriteAnimatedValue(animated, paramNode, name);\r
-       }\r
-       return paramNode;\r
-}\r
index 88d7cc90722c9611aad77fa23d4f70972dccf503..9be5a8bbb9bb37a0171007cb69df3c213333deaf 100644 (file)
@@ -553,7 +553,16 @@ public:
 \r
        static void WritePhysicsRigidBodyParameters(FCDPhysicsRigidBodyParameters* physicsRigidBodyParameters, xmlNode* techniqueNode);\r
        template <class TYPE, int QUAL>\r
-       static xmlNode* AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT<TYPE,QUAL>& value);\r
+       static xmlNode* AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT<TYPE,QUAL>& value) {\r
+               xmlNode* paramNode = AddChild(parentNode, name);\r
+               AddContent(paramNode, FUStringConversion::ToString((TYPE&) value));\r
+               if (value.IsAnimated())\r
+               {\r
+                       const FCDAnimated* animated = value.GetAnimated();\r
+                       FArchiveXML::WriteAnimatedValue(animated, paramNode, name);\r
+               }\r
+               return paramNode;\r
+       }\r
 \r
 \r
        //\r
index 7433a851d7a022043e702a56cfcd46dc8fba03a4..5d0f4f85c2f518167269621f3bef4838bd89a2f2 100644 (file)
@@ -697,28 +697,6 @@ void HierarchicalPathfinder::FindNearestNavcellInRegions(const std::set<RegionID
        jGoal = jBest;
 }
 
-void HierarchicalPathfinder::FindReachableRegions(RegionID from, std::set<RegionID>& reachable, pass_class_t passClass)
-{
-       // Flood-fill the region graph, starting at 'from',
-       // collecting all the regions that are reachable via edges
-
-       std::vector<RegionID> open;
-       open.push_back(from);
-       reachable.insert(from);
-
-       while (!open.empty())
-       {
-               RegionID curr = open.back();
-               open.pop_back();
-
-               for (const RegionID& region : m_Edges[passClass][curr])
-                       // Add to the reachable set; if this is the first time we added
-                       // it then also add it to the open list
-                       if (reachable.insert(region).second)
-                               open.push_back(region);
-       }
-}
-
 void HierarchicalPathfinder::FindPassableRegions(std::set<RegionID>& regions, pass_class_t passClass)
 {
        // Construct a set of all regions of all chunks for this pass class
index d928838ea61a9f893e87e039944d5fd3dab26800..86bce0314215fc8af7de00184cfbeaf5605c7626 100644 (file)
@@ -148,7 +148,27 @@ private:
 
        void FindEdges(u8 ci, u8 cj, pass_class_t passClass, EdgesMap& edges);
 
-       void FindReachableRegions(RegionID from, std::set<RegionID>& reachable, pass_class_t passClass);
+       void FindReachableRegions(RegionID from, std::set<RegionID>& reachable, pass_class_t passClass)
+       {
+               // Flood-fill the region graph, starting at 'from',
+               // collecting all the regions that are reachable via edges
+
+               std::vector<RegionID> open;
+               open.push_back(from);
+               reachable.insert(from);
+
+               while (!open.empty())
+               {
+                       RegionID curr = open.back();
+                       open.pop_back();
+
+                       for (const RegionID& region : m_Edges[passClass][curr])
+                               // Add to the reachable set; if this is the first time we added
+                               // it then also add it to the open list
+                               if (reachable.insert(region).second)
+                                       open.push_back(region);
+               }
+       }
 
        void FindPassableRegions(std::set<RegionID>& regions, pass_class_t passClass);