- did a test compile as C++20 and fixed all warnings that got emitted.

This commit is contained in:
Christoph Oelckers 2022-07-15 09:17:50 +02:00
parent d310487ad4
commit 595975fcc7
6 changed files with 10 additions and 16 deletions

View file

@ -39,10 +39,7 @@
#undef OPAQUE #undef OPAQUE
#endif #endif
enum constexpr int OPAQUE = 65536;
{
OPAQUE = 65536,
};
enum ETexMode enum ETexMode
{ {

View file

@ -64,7 +64,7 @@ CUSTOM_CVAR(Int, con_scaletext, 0, CVAR_ARCHIVE) // Scale notify text at high r
if (self < 0) self = 0; if (self < 0) self = 0;
} }
enum { NOTIFYFADETIME = 6 }; constexpr int NOTIFYFADETIME = 6;
CUSTOM_CVAR(Int, con_notifylines, 4, CVAR_GLOBALCONFIG | CVAR_ARCHIVE) CUSTOM_CVAR(Int, con_notifylines, 4, CVAR_GLOBALCONFIG | CVAR_ARCHIVE)
{ {

View file

@ -57,15 +57,15 @@ typedef enum
#endif #endif
#endif #endif
// State updates, number of tics / second.
constexpr int TICRATE = 35;
// Global constants that were defines. // Global constants that were defines.
enum enum
{ {
// The maximum number of players, multiplayer/networking. // The maximum number of players, multiplayer/networking.
MAXPLAYERS = 8, MAXPLAYERS = 8,
// State updates, number of tics / second.
TICRATE = 35,
// Amount of damage done by a telefrag. // Amount of damage done by a telefrag.
TELEFRAG_DAMAGE = 1000000 TELEFRAG_DAMAGE = 1000000
}; };

View file

@ -43,10 +43,7 @@ struct FBlockmap
// mapblocks are used to check movement // mapblocks are used to check movement
// against lines and things // against lines and things
enum static constexpr int MAPBLOCKUNITS = 128;
{
MAPBLOCKUNITS = 128
};
inline int GetBlockX(double xpos) inline int GetBlockX(double xpos)
{ {

View file

@ -92,8 +92,8 @@ namespace swrenderer
private: private:
void RenderSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double wx, double wy, double ticfrac, int lightlevel, FDynamicColormap *basecolormap, bool foggy); void RenderSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double wx, double wy, double ticfrac, int lightlevel, FDynamicColormap *basecolormap, bool foggy);
enum { BASEXCENTER = 160 }; static constexpr int BASEXCENTER = 160;
enum { BASEYCENTER = 100 }; static constexpr int BASEYCENTER = 100;
TArray<HWAccelPlayerSprite> AcceleratedSprites; TArray<HWAccelPlayerSprite> AcceleratedSprites;
sector_t tempsec; sector_t tempsec;

View file

@ -173,8 +173,8 @@ class FNodeBuilder
fixed64_t MinX, MinY, MaxX, MaxY; fixed64_t MinX, MinY, MaxX, MaxY;
int BlocksWide, BlocksTall; int BlocksWide, BlocksTall;
enum { BLOCK_SHIFT = 8 + FRACBITS }; static constexpr int BLOCK_SHIFT = 8 + FRACBITS;
enum { BLOCK_SIZE = 1 << BLOCK_SHIFT }; static constexpr int BLOCK_SIZE = 1 << BLOCK_SHIFT;
int InsertVertex (FPrivVert &vert); int InsertVertex (FPrivVert &vert);
inline int GetBlock (fixed64_t x, fixed64_t y) inline int GetBlock (fixed64_t x, fixed64_t y)