We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe0b828 commit 201a913Copy full SHA for 201a913
1 file changed
src/http_utils.cpp
@@ -541,14 +541,14 @@ bool ip_representation::operator <(const ip_representation& b) const
541
542
const std::string load_file (const std::string& filename)
543
{
544
- ifstream fp(filename, ios::in | ios::binary | ios::ate);
+ ifstream fp(filename.c_str(), ios::in | ios::binary | ios::ate);
545
if(fp.is_open())
546
547
std::string content;
548
549
- fp.seekg(0, std::ios::end);
+ fp.seekg(0, fp.end);
550
content.reserve(fp.tellg());
551
- fp.seekg(0, std::ios::beg);
+ fp.seekg(0, fp.beg);
552
553
content.assign((std::istreambuf_iterator<char>(fp)), std::istreambuf_iterator<char>());
554
return content;
0 commit comments