From 02449ed54be723241500ab870b49dcafe2549058 Mon Sep 17 00:00:00 2001 From: Michael Hamburg Date: Wed, 1 Jul 2015 14:47:57 -0700 Subject: [PATCH] encoding is no longer EXPLICIT_CON --- include/decaf_255.hxx | 12 ++---------- include/shake.hxx | 3 +++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/include/decaf_255.hxx b/include/decaf_255.hxx index 5331591..6eb7492 100644 --- a/include/decaf_255.hxx +++ b/include/decaf_255.hxx @@ -39,14 +39,8 @@ /** @cond internal */ #if __cplusplus >= 201103L #define NOEXCEPT noexcept -#define EXPLICIT_CON explicit -#define FINAL final -#define DELETE = delete #else #define NOEXCEPT throw() -#define EXPLICIT_CON -#define FINAL -#define DELETE #endif /** @endcond */ @@ -139,7 +133,7 @@ public: } /** @brief Encode to fixed-length string */ - inline EXPLICIT_CON operator SecureBuffer() const NOEXCEPT { + inline operator SecureBuffer() const NOEXCEPT { SecureBuffer buf(SER_BYTES); decaf_255_scalar_encode(buf,s); return buf; } @@ -331,7 +325,7 @@ public: /** * @brief Encode to string. The identity encodes to the all-zero string. */ - inline EXPLICIT_CON operator SecureBuffer() const NOEXCEPT { + inline operator SecureBuffer() const NOEXCEPT { SecureBuffer buffer(SER_BYTES); decaf_255_point_encode(buffer, p); return buffer; @@ -594,8 +588,6 @@ public: }; /* struct Decaf255 */ #undef NOEXCEPT -#undef EXPLICIT_CON -#undef FINAL } /* namespace decaf */ #endif /* __DECAF_255_HXX__ */ diff --git a/include/shake.hxx b/include/shake.hxx index 956e7f0..80b1eed 100644 --- a/include/shake.hxx +++ b/include/shake.hxx @@ -19,8 +19,10 @@ /** @cond internal */ #if __cplusplus >= 201103L #define NOEXCEPT noexcept +#define DELETE = delete #else #define NOEXCEPT throw() +#define DELETE #endif /** @endcond */ @@ -341,5 +343,6 @@ public: } /* namespace decaf */ #undef NOEXCEPT +#undef DELETE #endif /* __SHAKE_HXX__ */