Skip to content

Commit

Permalink
Use classic ifstream with char type
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast authored and axic committed Apr 29, 2019
1 parent 2cfd419 commit fc4b023
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

#include <vector>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <vector>

#include <evmc/evmc.h>

Expand All @@ -29,8 +29,9 @@ namespace hera {

bytes loadFileContents(string const& path)
{
basic_ifstream<uint8_t> is(path);
return bytes{(istreambuf_iterator<uint8_t>(is)), istreambuf_iterator<uint8_t>()};
using iterator = istreambuf_iterator<ifstream::char_type>;
ifstream is{path};
return {iterator{is}, iterator{}};
}

string toHex(evmc_uint256be const& value) {
Expand Down

0 comments on commit fc4b023

Please sign in to comment.