From b0c2317d3456860816ca2a384ce3f92fd1e4a23c Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 17 Dec 2021 00:06:11 +0100 Subject: [PATCH] Fix build on ubuntu 18.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /<>/openmw-0.47.0+git202112160802~ubuntu18.04.1/apps/navmeshtool/worldspacedata.cpp:213:109: error: class template argument deduction failed: heightfields.emplace_back(std::vector(std::begin(landData.mHeights), std::end(landData.mHeights))); ^ /<>/openmw-0.47.0+git202112160802~ubuntu18.04.1/apps/navmeshtool/worldspacedata.cpp:213:109: error: no matching function for call to ‘vector(float*, float*)’ In file included from /usr/include/c++/7/vector:64:0, from /<>/openmw-0.47.0+git202112160802~ubuntu18.04.1/components/esm/loadpgrd.hpp:5, from /<>/openmw-0.47.0+git202112160802~ubuntu18.04.1/components/misc/convert.hpp:5, from /<>/openmw-0.47.0+git202112160802~ubuntu18.04.1/components/bullethelpers/collisionobject.hpp:4, from /<>/openmw-0.47.0+git202112160802~ubuntu18.04.1/apps/navmeshtool/worldspacedata.hpp:4, from /<>/openmw-0.47.0+git202112160802~ubuntu18.04.1/apps/navmeshtool/worldspacedata.cpp:1: /usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc> vector(_InputIterator __first, _InputIterator __last, ^~~~~~ --- apps/navmeshtool/worldspacedata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/navmeshtool/worldspacedata.cpp b/apps/navmeshtool/worldspacedata.cpp index 189d24f34a..b88b967cf5 100644 --- a/apps/navmeshtool/worldspacedata.cpp +++ b/apps/navmeshtool/worldspacedata.cpp @@ -210,7 +210,7 @@ namespace NavMeshTool ESM::Land::LandData& landData = *landDatas.emplace_back(std::make_unique()); land->loadData(ESM::Land::DATA_VHGT, &landData); - heightfields.emplace_back(std::vector(std::begin(landData.mHeights), std::end(landData.mHeights))); + heightfields.push_back(std::vector(std::begin(landData.mHeights), std::end(landData.mHeights))); HeightfieldSurface surface; surface.mHeights = heightfields.back().data(); surface.mMinHeight = landData.mMinHeight;