1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-28 20:06:41 +00:00

Fix operator ++ for OutputTransformIterator

This commit is contained in:
elsid 2019-02-16 15:09:57 +03:00
parent c68e64a2a7
commit a0ed981a7c
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -81,21 +81,28 @@ namespace DetourNavigator
return *this; return *this;
} }
OutputTransformIterator& operator ++(int) OutputTransformIterator& operator ++()
{ {
mImpl++; ++mImpl.get();
return *this; return *this;
} }
OutputTransformIterator operator ++(int)
{
const auto copy = *this;
++(*this);
return copy;
}
OutputTransformIterator& operator =(const osg::Vec3f& value) OutputTransformIterator& operator =(const osg::Vec3f& value)
{ {
*mImpl = fromNavMeshCoordinates(mSettings, value); *mImpl.get() = fromNavMeshCoordinates(mSettings, value);
return *this; return *this;
} }
private: private:
OutputIterator& mImpl; std::reference_wrapper<OutputIterator> mImpl;
const Settings& mSettings; std::reference_wrapper<const Settings> mSettings;
}; };
inline void initNavMeshQuery(dtNavMeshQuery& value, const dtNavMesh& navMesh, const int maxNodes) inline void initNavMeshQuery(dtNavMeshQuery& value, const dtNavMesh& navMesh, const int maxNodes)