diff options
| author | Jeffrey Walton <noloader@gmail.com> | 2016-12-03 05:05:56 -0500 |
|---|---|---|
| committer | Jeffrey Walton <noloader@gmail.com> | 2016-12-03 05:05:56 -0500 |
| commit | ba75834ae9b3846a19291c8c281626dd0a891779 (patch) | |
| tree | 85c0492501a0f44c640120e9cacc740354824a47 /bench1.cpp | |
| parent | bded4d385fcb74c517e35bf252ac8c6d60a0599f (diff) | |
| download | cryptopp-git-ba75834ae9b3846a19291c8c281626dd0a891779.tar.gz | |
Removed VC++ 5.0 and 6.0 workarounds (Issue 342)
Diffstat (limited to 'bench1.cpp')
| -rw-r--r-- | bench1.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
@@ -206,13 +206,10 @@ void BenchMarkKeying(SimpleKeyingInterface &c, size_t keyLength, const NameValue OutputResultKeying(iterations, timeTaken);
}
-//VC60 workaround: compiler bug triggered without the extra dummy parameters
-// on VC60 also needs to be named differently from BenchMarkByName
template <class T_FactoryOutput, class T_Interface>
-void BenchMarkByName2(const char *factoryName, size_t keyLength = 0, const char *displayName=NULL, const NameValuePairs ¶ms = g_nullNameValuePairs, T_FactoryOutput *x=NULL, T_Interface *y=NULL)
+void BenchMarkByName2(const char *factoryName, size_t keyLength = 0, const char *displayName=NULL, const NameValuePairs ¶ms = g_nullNameValuePairs)
{
- CRYPTOPP_UNUSED(x), CRYPTOPP_UNUSED(y), CRYPTOPP_UNUSED(params);
-
+ CRYPTOPP_UNUSED(params);
std::string name(factoryName ? factoryName : "");
member_ptr<T_FactoryOutput> obj(ObjectFactoryRegistry<T_FactoryOutput>::Registry().CreateObject(name.c_str()));
@@ -229,20 +226,17 @@ void BenchMarkByName2(const char *factoryName, size_t keyLength = 0, const char BenchMarkKeying(*obj, keyLength, CombinedNameValuePairs(params, MakeParameters(Name::IV(), ConstByteArrayParameter(defaultKey, obj->IVSize()), false)));
}
-//VC60 workaround: compiler bug triggered without the extra dummy parameters
template <class T_FactoryOutput>
-void BenchMarkByName(const char *factoryName, size_t keyLength = 0, const char *displayName=NULL, const NameValuePairs ¶ms = g_nullNameValuePairs, T_FactoryOutput *x=NULL)
+void BenchMarkByName(const char *factoryName, size_t keyLength = 0, const char *displayName=NULL, const NameValuePairs ¶ms = g_nullNameValuePairs)
{
- CRYPTOPP_UNUSED(x), CRYPTOPP_UNUSED(params);
-
- BenchMarkByName2<T_FactoryOutput, T_FactoryOutput>(factoryName, keyLength, displayName, params, x, x);
+ CRYPTOPP_UNUSED(params);
+ BenchMarkByName2<T_FactoryOutput, T_FactoryOutput>(factoryName, keyLength, displayName, params);
}
template <class T>
-void BenchMarkByNameKeyLess(const char *factoryName, const char *displayName=NULL, const NameValuePairs ¶ms = g_nullNameValuePairs, T *x=NULL)
+void BenchMarkByNameKeyLess(const char *factoryName, const char *displayName=NULL, const NameValuePairs ¶ms = g_nullNameValuePairs)
{
- CRYPTOPP_UNUSED(x), CRYPTOPP_UNUSED(params);
-
+ CRYPTOPP_UNUSED(params);
std::string name = factoryName;
if (displayName)
name = displayName;
|
