| Index: src/Utils.cpp |
| =================================================================== |
| --- a/src/Utils.cpp |
| +++ b/src/Utils.cpp |
| @@ -22,24 +22,24 @@ |
| #include <Windows.h> |
| #include <Shlwapi.h> |
| #endif |
| #include "Utils.h" |
| using namespace AdblockPlus; |
| -std::string Utils::Slurp(std::istream& stream) |
| +std::string Utils::Slurp(const std::istream& stream) |
|
sergei
2017/04/12 13:34:30
I would like to avoid having const here because we
|
| { |
| std::stringstream content; |
| content << stream.rdbuf(); |
| return content.str(); |
| } |
| -std::string Utils::FromV8String(v8::Handle<v8::Value> value) |
| +std::string Utils::FromV8String(const v8::Handle<v8::Value>& value) |
|
sergei
2017/04/12 13:34:30
I'm not sure that v8::Handle should be passed by r
sergei
2017/04/18 14:02:14
What about it?
hub
2017/04/18 16:18:50
I thought I had replied to this one. My take is th
|
| { |
| v8::String::Utf8Value stringValue(value); |
| if (stringValue.length()) |
| return std::string(*stringValue, stringValue.length()); |
| else |
| return std::string(); |
| } |