mh_text: use c++11 for init
This commit is contained in:
parent
b4dfa40cbf
commit
495bd66bf5
@ -30,24 +30,26 @@
|
|||||||
* Maybe try to guess charset, or use default, then transcode to utf8
|
* Maybe try to guess charset, or use default, then transcode to utf8
|
||||||
*/
|
*/
|
||||||
class MimeHandlerText : public RecollFilter {
|
class MimeHandlerText : public RecollFilter {
|
||||||
public:
|
public:
|
||||||
MimeHandlerText(RclConfig *cnf, const std::string& id)
|
MimeHandlerText(RclConfig *cnf, const std::string& id)
|
||||||
: RecollFilter(cnf, id), m_paging(false), m_offs(0), m_pagesz(0) {
|
: RecollFilter(cnf, id), m_paging(false), m_offs(0), m_pagesz(0) {
|
||||||
}
|
}
|
||||||
virtual ~MimeHandlerText() {}
|
virtual ~MimeHandlerText() {}
|
||||||
|
|
||||||
virtual bool is_data_input_ok(DataInput input) const {
|
virtual bool is_data_input_ok(DataInput input) const {
|
||||||
if (input == DOCUMENT_FILE_NAME || input == DOCUMENT_STRING)
|
if (input == DOCUMENT_FILE_NAME || input == DOCUMENT_STRING)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
virtual bool next_document();
|
virtual bool next_document();
|
||||||
virtual bool skip_to_document(const std::string& s);
|
virtual bool skip_to_document(const std::string& s);
|
||||||
virtual void clear_impl() override {
|
virtual void clear_impl() override {
|
||||||
m_paging = false;
|
m_paging = false;
|
||||||
m_text.erase();
|
m_text.clear();
|
||||||
m_fn.erase();
|
m_fn.clear();
|
||||||
m_offs = 0;
|
m_offs = 0;
|
||||||
|
m_pagesz = 0;
|
||||||
|
m_charsetfromxattr.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -57,11 +59,11 @@ protected:
|
|||||||
const std::string&);
|
const std::string&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_paging;
|
bool m_paging{false};
|
||||||
std::string m_text;
|
std::string m_text;
|
||||||
std::string m_fn;
|
std::string m_fn;
|
||||||
int64_t m_offs; // Offset of next read in file if we're paging
|
int64_t m_offs{0}; // Offset of next read in file if we're paging
|
||||||
size_t m_pagesz;
|
size_t m_pagesz{0};
|
||||||
std::string m_charsetfromxattr;
|
std::string m_charsetfromxattr;
|
||||||
|
|
||||||
bool readnext();
|
bool readnext();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user