mh_text: use c++11 for init

This commit is contained in:
Jean-Francois Dockes 2018-11-22 17:46:06 +01:00
parent b4dfa40cbf
commit 495bd66bf5

View File

@ -30,7 +30,7 @@
* 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) {
} }
@ -45,9 +45,11 @@ class MimeHandlerText : public RecollFilter {
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();