From 186c3d135eacc064b28ffffeeebd082b77e92f8d Mon Sep 17 00:00:00 2001 From: bofdahof <172177156+bofdahof@users.noreply.github.com> Date: Wed, 12 Mar 2025 11:34:06 +1000 Subject: [PATCH] Base: Switch small enum base type to std::uint8_t int and size_t are much larger than necessary for storage of these enum types. --- src/Base/FileInfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Base/FileInfo.h b/src/Base/FileInfo.h index cfe21dc03c..e27baa9cf3 100644 --- a/src/Base/FileInfo.h +++ b/src/Base/FileInfo.h @@ -39,7 +39,7 @@ class TimeInfo; /// When reading and writing a character stream, the incoming data can be dumped into the stream /// unaltered (if it contains only data that is valid in the current XML character set), or it can /// be Base64-encoded. This enum is used by Reader and Writer to distinguish the two cases. -enum class CharStreamFormat : size_t +enum class CharStreamFormat : std::uint8_t { Raw, Base64Encoded @@ -53,7 +53,7 @@ enum class CharStreamFormat : size_t class BaseExport FileInfo { public: - enum Permissions + enum Permissions : std::uint8_t { WriteOnly = 0x01, ReadOnly = 0x02,