Skip to content

Commit

Permalink
Change code editor API file syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Sep 29, 2024
1 parent f93d0a7 commit 6361385
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ui/controls/codeeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@ wxString CodeEditor::StripExtraInfo(const wxString& function)
//-------------------------------------------------------------
wxString CodeEditor::GetReturnType(const wxString& function)
{
const auto parenthesisStart = function.find(L"\t");
if (parenthesisStart != wxString::npos)
const auto retSepStart = function.find(L"->");
if (retSepStart != wxString::npos)
{
wxString returnType = function.substr(parenthesisStart);
wxString returnType = function.substr(retSepStart + 2);
returnType.Trim(true);
returnType.Trim(false);
return returnType;
Expand Down
4 changes: 2 additions & 2 deletions src/ui/controls/codeeditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace Wisteria::UI
@param[in,out] functions The classes and functions inside of the library.
The syntax for these strings is
the name of the function and (optionally) a return type following a tab character.
For example, `"GetUser()\tUser"` will load a function named `GetUser`
For example, `"GetUser()->User"` will load a function named `GetUser`
with a return type of `User`.
@sa Finalize().*/
void AddLibrary(const wxString& library, NameList& functions);
Expand All @@ -102,7 +102,7 @@ namespace Wisteria::UI
@param[in,out] functions The functions inside of the class.
The syntax for these strings is the name of the function and
(optionally) a return type following a tab character.
For example, `"GetUser()\tUser"` will load a function
For example, `"GetUser()->User"` will load a function
named `GetUser` with a return type of `User`.
@sa Finalize().*/
void AddClass(const wxString& theClass, NameList& functions);
Expand Down

0 comments on commit 6361385

Please sign in to comment.