diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-03-09 22:51:19 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2021-03-09 22:51:19 -0500 |
commit | f7e6af6344f2b1f3e4a6afe1ac2cc870af2d3944 (patch) | |
tree | 49c9d4a6760efec8114df7366a007befd08c5b5a /asn.h | |
parent | 5c4c631e9291c57e237d6d40bb2c3456eb597f3d (diff) | |
download | cryptopp-git-f7e6af6344f2b1f3e4a6afe1ac2cc870af2d3944.tar.gz |
Add EnumToInt conversion macro for enum-enum conversion warnings (GH #1016)
Diffstat (limited to 'asn.h')
-rw-r--r-- | asn.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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
|