summaryrefslogtreecommitdiff
path: root/ida.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-12-03 21:31:22 -0500
committerJeffrey Walton <noloader@gmail.com>2016-12-03 21:31:22 -0500
commit56a91ca1971d8e8df8bde1fcec512ddb93b72bbf (patch)
tree7d2394a2cd812fab2bd659d368b74b3908015e19 /ida.cpp
parenta274a64058b8dc5b66f6e50dbd0e0250eaed08e8 (diff)
downloadcryptopp-git-56a91ca1971d8e8df8bde1fcec512ddb93b72bbf.tar.gz
Remove last of macros targtting _MSC_VER 1200 (Issue 342)
Diffstat (limited to 'ida.cpp')
-rw-r--r--ida.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/ida.cpp b/ida.cpp
index 64bcf968..cecee352 100644
--- a/ida.cpp
+++ b/ida.cpp
@@ -4,19 +4,27 @@
#include "config.h"
#include "ida.h"
+#include "stdcpp.h"
#include "algebra.h"
#include "gf2_32.h"
#include "polynomi.h"
#include "polynomi.cpp"
-#include <functional>
-
ANONYMOUS_NAMESPACE_BEGIN
-static const CryptoPP::GF2_32 field;
+const CryptoPP::GF2_32 field;
NAMESPACE_END
NAMESPACE_BEGIN(CryptoPP)
+#if (defined(_MSC_VER) && (_MSC_VER < 1400)) && !defined(__MWERKS__)
+ // VC60 and VC7 workaround: built-in reverse_iterator has two template parameters, Dinkumware only has one
+ typedef std::reverse_bidirectional_iterator<const byte *, const byte> RevIt;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
+ typedef std::reverse_iterator<const byte *, std::random_access_iterator_tag, const byte> RevIt;
+#else
+ typedef std::reverse_iterator<const byte *> RevIt;
+#endif
+
void RawIDA::IsolatedInitialize(const NameValuePairs &parameters)
{
if (!parameters.GetIntValue("RecoveryThreshold", m_threshold))
@@ -394,14 +402,6 @@ size_t PaddingRemover::Put2(const byte *begin, size_t length, int messageEnd, bo
m_possiblePadding = false;
}
-#if defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__MWERKS__)
- // VC60 and VC7 workaround: built-in reverse_iterator has two template parameters, Dinkumware only has one
- typedef std::reverse_bidirectional_iterator<const byte *, const byte> RevIt;
-#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
- typedef std::reverse_iterator<const byte *, std::random_access_iterator_tag, const byte> RevIt;
-#else
- typedef std::reverse_iterator<const byte *> RevIt;
-#endif
const byte *x = std::find_if(RevIt(end), RevIt(begin), std::bind2nd(std::not_equal_to<byte>(), byte(0))).base();
if (x != begin && *(x-1) == 1)
{