summaryrefslogtreecommitdiff
path: root/datatest.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-05-12 03:50:37 -0400
committerJeffrey Walton <noloader@gmail.com>2017-05-12 03:50:37 -0400
commit3f9667f3cd7541291705de413f37b7471ce5c6e5 (patch)
treef5b9e52dd078ca1c3a8fdd070ae8946112b0b30c /datatest.cpp
parentb160cb40e1e8615b53954dd571efaa846588bf1b (diff)
downloadcryptopp-git-3f9667f3cd7541291705de413f37b7471ce5c6e5.tar.gz
Remove VC++ 6.0 workaround in datatest.cpp
Diffstat (limited to 'datatest.cpp')
-rw-r--r--datatest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/datatest.cpp b/datatest.cpp
index c68f6266..e15d795f 100644
--- a/datatest.cpp
+++ b/datatest.cpp
@@ -111,12 +111,11 @@ void PutDecodedDatumInto(const TestData &data, const char *name, BufferedTransfo
int repeat = 1;
if (s1[0] == 'r')
{
- repeat = atoi(s1.c_str()+1);
+ repeat = ::atoi(s1.c_str()+1);
s1 = s1.substr(s1.find(' ')+1);
}
- s2 = ""; // MSVC 6 doesn't have clear();
-
+ s2.clear();
if (s1[0] == '\"')
{
s2 = s1.substr(1, s1.find('\"', 1)-1);
@@ -708,7 +707,7 @@ bool GetField(std::istream &is, std::string &name, std::string &value)
p = line.find('#', l);
if (p < t) {
t = p;
- t = line.find_last_not_of(whitespace, t);
+ t = line.find_last_not_of(whitespace, t-1);
}
value += line.substr(l, t - l + 1);
@@ -760,6 +759,7 @@ void TestDataFile(std::string filename, const NameValuePairs &overrideParameters
std::ifstream file(filename.c_str());
if (!file.good())
throw Exception(Exception::OTHER_ERROR, "Can not open file " + filename + " for reading");
+
TestData v;
s_currentTestData = &v;
std::string name, value, lastAlgName;