From 3db6a38b4be1483445dba05e8603b8404ebf6558 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 30 Sep 2022 14:22:38 +1000 Subject: [PATCH] - Make `dragpoint()` inline since its a wrapper for another function anyway. --- source/core/gamefuncs.cpp | 15 --------------- source/core/gamefuncs.h | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/source/core/gamefuncs.cpp b/source/core/gamefuncs.cpp index ad384f753..fc13dee84 100644 --- a/source/core/gamefuncs.cpp +++ b/source/core/gamefuncs.cpp @@ -402,21 +402,6 @@ bool sectorsConnected(int sect1, int sect2) return false; } -//========================================================================== -// -// -// -//========================================================================== - -void dragpoint(walltype* startwall, const DVector2& pos) -{ - vertexscan(startwall, [&](walltype* wal) - { - wal->move(pos); - wal->sectorp()->exflags |= SECTOREX_DRAGGED; - }); -} - //========================================================================== // // diff --git a/source/core/gamefuncs.h b/source/core/gamefuncs.h index 512017bcf..39dda0618 100644 --- a/source/core/gamefuncs.h +++ b/source/core/gamefuncs.h @@ -160,6 +160,22 @@ void vertexscan(walltype* startwall, func mark) } +//========================================================================== +// +// +// +//========================================================================== + +inline void dragpoint(walltype* startwall, const DVector2& pos) +{ + vertexscan(startwall, [&](walltype* wal) + { + wal->move(pos); + wal->sectorp()->exflags |= SECTOREX_DRAGGED; + }); +} + + //--------------------------------------------------------------------------- // // Constants used for Build sine/cosine functions. @@ -256,7 +272,6 @@ EClose IsCloseToWall(const DVector2& vect, walltype* wal, double walldist); void checkRotatedWalls(); bool sectorsConnected(int sect1, int sect2); -void dragpoint(walltype* wal, const DVector2& pos); int32_t inside(double x, double y, const sectortype* sect); int insidePoly(double x, double y, const DVector2* points, int count);