Skip to content

Commit

Permalink
Output first_id warning when using enum for C++
Browse files Browse the repository at this point in the history
The #define code path isn't used in that case so that message wouldn't
be output otherwise.
  • Loading branch information
sodevel committed May 28, 2024
1 parent aebdbda commit e275391
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/codegen/cppcg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,9 @@ void CppCodeGenerator::GenEnumIds(PObjectBase class_obj)
}

if (!macros.empty()) {
if (m_firstID < wxID_HIGHEST) {
wxLogWarning(_("First ID is less than %i"), wxID_HIGHEST);
}
m_header->WriteLn(wxString::Format("%s = %i,", *macros.begin(), m_firstID));
macros.erase(macros.begin());
}
Expand Down

0 comments on commit e275391

Please sign in to comment.