summaryrefslogtreecommitdiff
path: root/asn.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-03-09 22:51:19 -0500
committerJeffrey Walton <noloader@gmail.com>2021-03-09 22:51:19 -0500
commitf7e6af6344f2b1f3e4a6afe1ac2cc870af2d3944 (patch)
tree49c9d4a6760efec8114df7366a007befd08c5b5a /asn.h
parent5c4c631e9291c57e237d6d40bb2c3456eb597f3d (diff)
downloadcryptopp-git-f7e6af6344f2b1f3e4a6afe1ac2cc870af2d3944.tar.gz
Add EnumToInt conversion macro for enum-enum conversion warnings (GH #1016)
Diffstat (limited to 'asn.h')
-rw-r--r--asn.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/asn.h b/asn.h
index 84a739c5..d021bb63 100644
--- a/asn.h
+++ b/asn.h
@@ -380,7 +380,7 @@ class CRYPTOPP_DLL BERGeneralDecoder : public Store
{
public:
/// \brief Default ASN.1 tag
- enum {DefaultTag = SEQUENCE | static_cast<int>(CONSTRUCTED)};
+ enum {DefaultTag = SEQUENCE | EnumToInt(CONSTRUCTED)};
virtual ~BERGeneralDecoder();
@@ -491,7 +491,7 @@ class CRYPTOPP_DLL DERGeneralEncoder : public ByteQueue
{
public:
/// \brief Default ASN.1 tag
- enum {DefaultTag = SEQUENCE | static_cast<int>(CONSTRUCTED)};
+ enum {DefaultTag = SEQUENCE | EnumToInt(CONSTRUCTED)};
virtual ~DERGeneralEncoder();
@@ -525,7 +525,7 @@ class CRYPTOPP_DLL BERSequenceDecoder : public BERGeneralDecoder
{
public:
/// \brief Default ASN.1 tag
- enum {DefaultTag = SEQUENCE | static_cast<int>(CONSTRUCTED)};
+ enum {DefaultTag = SEQUENCE | EnumToInt(CONSTRUCTED)};
/// \brief Construct an ASN.1 decoder
/// \param inQueue input byte queue
@@ -557,7 +557,7 @@ class CRYPTOPP_DLL DERSequenceEncoder : public DERGeneralEncoder
{
public:
/// \brief Default ASN.1 tag
- enum {DefaultTag = SEQUENCE | static_cast<int>(CONSTRUCTED)};
+ enum {DefaultTag = SEQUENCE | EnumToInt(CONSTRUCTED)};
/// \brief Construct an ASN.1 encoder
/// \param outQueue output byte queue
@@ -589,7 +589,7 @@ class CRYPTOPP_DLL BERSetDecoder : public BERGeneralDecoder
{
public:
/// \brief Default ASN.1 tag
- enum {DefaultTag = SET | static_cast<int>(CONSTRUCTED)};
+ enum {DefaultTag = SET | EnumToInt(CONSTRUCTED)};
/// \brief Construct an ASN.1 decoder
/// \param inQueue input byte queue
@@ -621,7 +621,7 @@ class CRYPTOPP_DLL DERSetEncoder : public DERGeneralEncoder
{
public:
/// \brief Default ASN.1 tag
- enum {DefaultTag = SET | static_cast<int>(CONSTRUCTED)};
+ enum {DefaultTag = SET | EnumToInt(CONSTRUCTED)};
/// \brief Construct an ASN.1 encoder
/// \param outQueue output byte queue