change dubious idioms tricking older gcc for more robust variants

This commit is contained in:
Jean-Francois Dockes 2021-08-12 18:52:34 +02:00
parent 03e277c0c9
commit f91185fd53
2 changed files with 2 additions and 2 deletions

View File

@ -346,7 +346,7 @@ bool MimeHandlerMbox::set_document_file_impl(const string&, const string &fn)
LOGDEB("MimeHandlerMbox::set_document_file(" << fn << ")\n");
clear_impl();
m->fn = fn;
m->instream = ifstream(fn.c_str(), std::ifstream::binary);
m->instream.open(fn.c_str(), std::ifstream::binary);
if (!m->instream.good()) {
LOGSYSERR("MimeHandlerMail::set_document_file", "ifstream", fn);
return false;

View File

@ -1497,7 +1497,7 @@ Query_getgroups(recoll_QueryObject* self, PyObject *, PyObject *)
// make a python list of each, then group those in a pair, and
// append this to the main list.
for (unsigned int i = 0; i < hld.index_term_groups.size(); i++) {
HighlightData::TermGroup& tg{hld.index_term_groups[i]};
HighlightData::TermGroup& tg(hld.index_term_groups[i]);
unsigned int ugidx = tg.grpsugidx;
ulist = PyList_New(hld.ugroups[ugidx].size());
for (unsigned int j = 0; j < hld.ugroups[ugidx].size(); j++) {