cppparser: fix CPPStructType::is_trivial() for eg. ButtonHandle

This commit is contained in:
rdb 2018-10-29 22:38:00 +01:00 committed by Sam Edwards
parent 33385facfb
commit 2ed4cd7ce6
1 changed files with 1 additions and 5 deletions

View File

@ -306,7 +306,6 @@ is_trivial() const {
}
// Now look for functions that are virtual or con/destructors.
bool is_default_constructible = true;
CPPScope::Functions::const_iterator fi;
for (fi = _scope->_functions.begin(); fi != _scope->_functions.end(); ++fi) {
CPPFunctionGroup *fgroup = (*fi).second;
@ -343,9 +342,6 @@ is_trivial() const {
// Same for the default constructor.
return false;
}
// The presence of a non-default constructor makes the class not
// default-constructible.
is_default_constructible = false;
}
if (fgroup->_name == "operator =") {
@ -356,7 +352,7 @@ is_trivial() const {
}
// Finally, the class must be default-constructible.
return is_default_constructible;
return is_default_constructible(V_public);
}
/**