1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

Fix build on ubuntu 18.04

/<<BUILDDIR>>/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)));
                                                                                                             ^
/<<BUILDDIR>>/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 /<<BUILDDIR>>/openmw-0.47.0+git202112160802~ubuntu18.04.1/components/esm/loadpgrd.hpp:5,
                 from /<<BUILDDIR>>/openmw-0.47.0+git202112160802~ubuntu18.04.1/components/misc/convert.hpp:5,
                 from /<<BUILDDIR>>/openmw-0.47.0+git202112160802~ubuntu18.04.1/components/bullethelpers/collisionobject.hpp:4,
                 from /<<BUILDDIR>>/openmw-0.47.0+git202112160802~ubuntu18.04.1/apps/navmeshtool/worldspacedata.hpp:4,
                 from /<<BUILDDIR>>/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<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>
  vector(_InputIterator __first, _InputIterator __last,
  ^~~~~~
This commit is contained in:
elsid 2021-12-17 00:06:11 +01:00
parent cc97c4450a
commit b0c2317d34
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -210,7 +210,7 @@ namespace NavMeshTool
ESM::Land::LandData& landData = *landDatas.emplace_back(std::make_unique<ESM::Land::LandData>());
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<float>(std::begin(landData.mHeights), std::end(landData.mHeights)));
HeightfieldSurface surface;
surface.mHeights = heightfields.back().data();
surface.mMinHeight = landData.mMinHeight;