On 2016/01/15 17:00:35, Felix Dahlke wrote:
> Nit: Words in camel cased names should be separated by an underscore in
include
> guards, i.e. `ADBLOCK_PLUS_ACTIVE_FILTER`.
Done.
2 #define ADBLOCKPLUS_ACTIVEFILTER_H
3
4 #include <string>
5
6 #include "tools.h"
7 #include "Filter.h"
8
9 class ActiveFilter : public Filter
10 {
11 public:
12 ActiveFilter(const std::u16string& text);
Felix Dahlke
2016/01/15 17:00:35
Please use the explicit keyword for single paramet
Please use the explicit keyword for single parameter constructors - unless you
actually want the automatic conversion.
Felix Dahlke
2016/01/15 17:00:35
I'd prefer to go for std::wstring, we also use it
I'd prefer to go for std::wstring, we also use it in libadblockplus to store JS
strings, and the Emscripten tests all use std::wstring.
On 2016/01/15 17:00:35, Felix Dahlke wrote:
> Please use the explicit keyword for single parameter constructors - unless you
> actually want the automatic conversion.
Done.
Wladimir Palant
2016/01/15 20:36:15
Done though merely as a side-effect of using embin
On 2016/01/15 17:00:35, Felix Dahlke wrote:
> I'd prefer to go for std::wstring, we also use it in libadblockplus to store
JS
> strings, and the Emscripten tests all use std::wstring.
Done though merely as a side-effect of using embind. As explained on IRC, using
char16_t is preferable because unlike wchar_t it is a fixed-width type and it's
also saves us some memory. Well, embind doesn't support std::u16string and it
crashes if size of wchar_t isn't 4 bytes.