wxwidgets.cfg: Added support for wxMenu:Append().

This commit is contained in:
orbitcowboy 2017-10-17 10:59:23 +02:00
parent 6e737082da
commit f1e5f64690
3 changed files with 29 additions and 16 deletions

View File

@ -882,6 +882,22 @@
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
</function> </function>
<!-- http://docs.wxwidgets.org/3.1/classwx_menu.html-->
<!-- wxMenuItem * Append (int id, const wxString &item=wxEmptyString, const wxString &helpString=wxEmptyString, wxItemKind kind=wxITEM_NORMAL) -->
<function name="wxMenu::Append">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxMenuItem *"/>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="wxEmptyString"/>
<arg nr="3" default="wxEmptyString"/>
<arg nr="4" default="wxITEM_NORMAL">
<not-uninit/>
</arg>
</function>
<!-- Override macros which don't necessarily require semicolons at the end --> <!-- Override macros which don't necessarily require semicolons at the end -->
<define name="DECLARE_CLASS(n)" value=""/> <define name="DECLARE_CLASS(n)" value=""/>
<define name="DECLARE_DYNAMIC_CLASS(n)" value=""/> <define name="DECLARE_DYNAMIC_CLASS(n)" value=""/>

View File

@ -292,9 +292,9 @@ void SymbolDatabase::createSymbolDatabaseFindAllScopes()
typeList.push_back(Type(tok, new_scope, scope)); typeList.push_back(Type(tok, new_scope, scope));
{ {
Type* new_type = &typeList.back(); Type* new_type = &typeList.back();
new_scope->definedType = new_type; new_scope->definedType = new_type;
scope->definedTypesMap[new_type->name()] = new_type; scope->definedTypesMap[new_type->name()] = new_type;
} }
scope->addVariable(varNameTok, tok, tok, access[scope], new_scope->definedType, scope, &_settings->library); scope->addVariable(varNameTok, tok, tok, access[scope], new_scope->definedType, scope, &_settings->library);
@ -333,9 +333,9 @@ void SymbolDatabase::createSymbolDatabaseFindAllScopes()
typeList.push_back(Type(tok, new_scope, scope)); typeList.push_back(Type(tok, new_scope, scope));
{ {
Type* new_type = &typeList.back(); Type* new_type = &typeList.back();
new_scope->definedType = new_type; new_scope->definedType = new_type;
scope->definedTypesMap[new_type->name()] = new_type; scope->definedTypesMap[new_type->name()] = new_type;
} }
// make sure we have valid code // make sure we have valid code
@ -4350,13 +4350,10 @@ const Type* Scope::findType(const std::string & name) const
{ {
auto it = definedTypesMap.find(name); auto it = definedTypesMap.find(name);
if (definedTypesMap.end() == it) if (definedTypesMap.end() == it) {
{ return nullptr;
return nullptr; } else {
} return (*it).second;
else
{
return (*it).second;
} }
} }

View File

@ -240,12 +240,12 @@ public:
_tokType = t; _tokType = t;
bool memoizedIsName = (_tokType == eName || _tokType == eType || _tokType == eVariable || bool memoizedIsName = (_tokType == eName || _tokType == eType || _tokType == eVariable ||
_tokType == eFunction || _tokType == eKeyword || _tokType == eBoolean || _tokType == eFunction || _tokType == eKeyword || _tokType == eBoolean ||
_tokType == eEnumerator); // TODO: "true"/"false" aren't really a name... _tokType == eEnumerator); // TODO: "true"/"false" aren't really a name...
setFlag(fIsName, memoizedIsName); setFlag(fIsName, memoizedIsName);
bool memoizedIsLiteral = (_tokType == eNumber || _tokType == eString || _tokType == eChar || bool memoizedIsLiteral = (_tokType == eNumber || _tokType == eString || _tokType == eChar ||
_tokType == eBoolean || _tokType == eLiteral || _tokType == eEnumerator); _tokType == eBoolean || _tokType == eLiteral || _tokType == eEnumerator);
setFlag(fIsLiteral, memoizedIsLiteral); setFlag(fIsLiteral, memoizedIsLiteral);
} }
void isKeyword(bool kwd) { void isKeyword(bool kwd) {