From ea4c0557d0b7c2317e03d3d3aaefd6063c99f091 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 26 Mar 2024 01:45:33 +0100 Subject: DWORD replaced with std::uint32_t in non-Win32-related parts With the exception of some netcode. This brings some important questions and solidifies me in pursuing better abstract over definitions. It might also be a good idea to have distinct aliases or compound types for time and (net) identifiers. --- StarsEx/ParseUtil.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'StarsEx/ParseUtil.h') diff --git a/StarsEx/ParseUtil.h b/StarsEx/ParseUtil.h index 0e147e0..221531e 100644 --- a/StarsEx/ParseUtil.h +++ b/StarsEx/ParseUtil.h @@ -11,9 +11,9 @@ Parser utility functions */ -#ifndef ParseUtil_h -#define ParseUtil_h +#pragma once +#include #include #include @@ -23,28 +23,21 @@ #include "Geometry.h" #include "Color.h" -// +--------------------------------------------------------------------+ bool GetDefBool(bool& dst, TermDef* def, const char* file); bool GetDefText(Text& dst, TermDef* def, const char* file); bool GetDefText(char* dst, TermDef* def, const char* file); -bool GetDefNumber(int& dst, TermDef* def, const char* file); -bool GetDefNumber(DWORD& dst, TermDef* def, const char* file); -bool GetDefNumber(float& dst, TermDef* def, const char* file); -bool GetDefNumber(double& dst, TermDef* def, const char* file); +template bool GetDefNumber(Number& dst, TermDef* def, const char* file); bool GetDefVec(Vec3& dst, TermDef* def, const char* file); bool GetDefColor(Color& dst, TermDef* def, const char* file); bool GetDefColor(ColorValue& dst, TermDef* def, const char* file); bool GetDefRect(Rect& dst, TermDef* def, const char* file); bool GetDefInsets(Insets& dst, TermDef* def, const char* file); bool GetDefTime(int& dst, TermDef* def, const char* file); - bool GetDefArray(int* dst, int size, TermDef* def, const char* file); bool GetDefArray(float* dst, int size, TermDef* def, const char* file); bool GetDefArray(double* dst, int size, TermDef* def, const char* file); bool GetDefArray(std::vector& array, TermDef* def, const char* file); bool GetDefArray(std::vector& array, TermDef* def, const char* file); -// +--------------------------------------------------------------------+ - -#endif // ParseUtil_h +#include "ParseUtil.inl.h" -- cgit v1.1