From 3bcee73c84f9dc169adc5351e225e6996d043d51 Mon Sep 17 00:00:00 2001 From: Dimitry Date: Mon, 1 Jun 2015 14:07:31 +0300 Subject: [PATCH] Random Code: build issues --- test/fuzzTesting/fuzzHelper.cpp | 6 +++--- test/fuzzTesting/fuzzHelper.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/fuzzTesting/fuzzHelper.cpp b/test/fuzzTesting/fuzzHelper.cpp index 7d7896947..3b6cf19c9 100644 --- a/test/fuzzTesting/fuzzHelper.cpp +++ b/test/fuzzTesting/fuzzHelper.cpp @@ -40,11 +40,11 @@ boostIntGenerator RandomCode::randOpCodeGen = boostIntGenerator(gen, opCodeDist) boostIntGenerator RandomCode::randOpLengGen = boostIntGenerator(gen, opLengDist); boostIntGenerator RandomCode::randUniIntGen = boostIntGenerator(gen, uniIntDist); -std::string RandomCode::rndByteSequence(int _length, SizeStrictness sizeType) +std::string RandomCode::rndByteSequence(int _length, SizeStrictness _sizeType) { refreshSeed(); std::string hash; - _length = (sizeType == SizeStrictness::Strict) ? std::max(1, _length) : randomUniInt() % _length; + _length = (_sizeType == SizeStrictness::Strict) ? std::max(1, _length) : randomUniInt() % _length; for (auto i = 0; i < _length; i++) { uint8_t byte = randOpCodeGen(); @@ -182,7 +182,7 @@ void RandomCodeOptions::addAddress(dev::Address const& _address) addressList.push_back(_address); } -dev::Address RandomCodeOptions::getRandomAddress() +dev::Address RandomCodeOptions::getRandomAddress() const { if (addressList.size() > 0) { diff --git a/test/fuzzTesting/fuzzHelper.h b/test/fuzzTesting/fuzzHelper.h index 7cdce54ac..371e40fbf 100644 --- a/test/fuzzTesting/fuzzHelper.h +++ b/test/fuzzTesting/fuzzHelper.h @@ -47,7 +47,7 @@ public: RandomCodeOptions(); void setWeight(dev::eth::Instruction _opCode, int _weight); void addAddress(dev::Address const& _address); - dev::Address getRandomAddress(); + dev::Address getRandomAddress() const; bool useUndefinedOpCodes; int smartCodeProbability;