Skip to content

Commit 201a913

Browse files
committed
Make code compatible with C++98
1 parent fe0b828 commit 201a913

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/http_utils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,14 +541,14 @@ bool ip_representation::operator <(const ip_representation& b) const
541541

542542
const std::string load_file (const std::string& filename)
543543
{
544-
ifstream fp(filename, ios::in | ios::binary | ios::ate);
544+
ifstream fp(filename.c_str(), ios::in | ios::binary | ios::ate);
545545
if(fp.is_open())
546546
{
547547
std::string content;
548548

549-
fp.seekg(0, std::ios::end);
549+
fp.seekg(0, fp.end);
550550
content.reserve(fp.tellg());
551-
fp.seekg(0, std::ios::beg);
551+
fp.seekg(0, fp.beg);
552552

553553
content.assign((std::istreambuf_iterator<char>(fp)), std::istreambuf_iterator<char>());
554554
return content;

0 commit comments

Comments
 (0)