Skip to content

Commit c4e2c52

Browse files
committed
refactor(gpg): specify enum underlying type as uint8_t
* Use `std::uint8_t` as the underlying type for the `GpgComponentType` enum to improve memory efficiency. * Add explicit include for `<cstdint>`. * Prepares codebase for scenarios where enum size matters, such as serialization or interop.
1 parent abe7977 commit c4e2c52

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/core/function/gpg/GpgContext.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
#include <gpgme.h>
3232

33+
#include <cstdint>
34+
3335
#include "core/function/basic/GpgFunctionObject.h"
3436

3537
namespace GpgFrontend {
@@ -47,7 +49,12 @@ struct GpgContextInitArgs {
4749
bool auto_import_missing_key = false; ///<
4850
};
4951

50-
enum class GpgComponentType { kGPG_AGENT, kDIRMNGR, kKEYBOXD, kGPG_AGENT_SSH };
52+
enum class GpgComponentType : std::uint8_t {
53+
kGPG_AGENT,
54+
kDIRMNGR,
55+
kKEYBOXD,
56+
kGPG_AGENT_SSH
57+
};
5158

5259
/**
5360
* @brief

0 commit comments

Comments
 (0)