Skip to content

Commit

Permalink
Warn about wxDECLARE_NO_COPY_CLASS usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Dec 20, 2023
1 parent 14452fb commit 24522aa
Showing 1 changed file with 48 additions and 47 deletions.
95 changes: 48 additions & 47 deletions src/i18n_review.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,48 +125,48 @@ namespace i18n_check
m_deprecated_string_functions = {
// Win32 TCHAR functions (which mapped between _MBCS and _UNICODE builds).
// Nowadays, you should be using _UNICODE (i.e., UTF-16) always.
{ L"_tcscat", L"Consider using std::wcscat() instead." },
{ L"_tcschr", L"Consider using std::wcschr() instead." },
{ L"_tcscmp", L"Consider using std::wcscmp() instead." },
{ L"_tcscoll", L"Consider using std::wcscoll() instead." },
{ L"_tcscpy", L"Consider using std::wcscpy() instead." },
{ L"_tcsdup", L"Consider using std::wcsdup() instead." },
{ L"_tcslen", L"Consider using std::wcslen() or (wrap in a std::wstring_view) instead." },
{ L"_tcsncat", L"Consider using std::wcsncat() instead." },
{ L"_tcsnccmp", L"Consider using std::wcsncmp() instead." },
{ L"_tcsncpy", L"Consider using std::wcsncpy() instead." },
{ L"_tcspbrk", L"Consider using std::wcspbrk() instead." },
{ L"_tcsrchr", L"Consider using std::wcsrchr() instead." },
{ L"_tcsspn", L"Consider using std::wcsspn() instead." },
{ L"_tcsstr", L"Consider using std::wcsstr() instead." },
{ L"_tcstok", L"Consider using std::wcstok() instead." },
{ L"_tcsxfrm", L"Consider using std::wcsxfrm() instead." },
{ L"wsprintf", L"Consider using std::swprintf() instead." },
{ L"_stprintf", L"Consider using std::swprintf() instead." },
{ L"TCHAR", L"Consider using wchar_t instead." },
{ L"_tcscat", L"Use std::wcscat() instead." },
{ L"_tcschr", L"Use std::wcschr() instead." },
{ L"_tcscmp", L"Use std::wcscmp() instead." },
{ L"_tcscoll", L"Use std::wcscoll() instead." },
{ L"_tcscpy", L"Use std::wcscpy() instead." },
{ L"_tcsdup", L"Use std::wcsdup() instead." },
{ L"_tcslen", L"Use std::wcslen() or (wrap in a std::wstring_view) instead." },
{ L"_tcsncat", L"Use std::wcsncat() instead." },
{ L"_tcsnccmp", L"Use std::wcsncmp() instead." },
{ L"_tcsncpy", L"Use std::wcsncpy() instead." },
{ L"_tcspbrk", L"Use std::wcspbrk() instead." },
{ L"_tcsrchr", L"Use std::wcsrchr() instead." },
{ L"_tcsspn", L"Use std::wcsspn() instead." },
{ L"_tcsstr", L"Use std::wcsstr() instead." },
{ L"_tcstok", L"Use std::wcstok() instead." },
{ L"_tcsxfrm", L"Use std::wcsxfrm() instead." },
{ L"wsprintf", L"Use std::swprintf() instead." },
{ L"_stprintf", L"Use std::swprintf() instead." },
{ L"TCHAR", L"Use wchar_t instead." },
// wxWidgets
{ L"wxStrlen", L"Consider using std::wcslen() or (wrap in a std::wstring_view) instead." },
{ L"wxStrstr", L"Consider using std::wcsstr() instead." },
{ L"wxStrchr", L"Consider using std::wcschr() instead." },
{ L"wxStrdup", L"Consider using std::wcsdup() instead." },
{ L"wxStrcpy", L"Consider using std::wcscpy() instead." },
{ L"wxStrncpy", L"Consider using std::wcsncpy() instead." },
{ L"wxStrcat ", L"Consider using std::wcscat() instead." },
{ L"wxStrncat", L"Consider using std::wcsncat() instead." },
{ L"wxStrtok", L"Consider using std::wcstok() instead." },
{ L"wxStrrchr", L"Consider using std::wcsrchr() instead." },
{ L"wxStrpbrk", L"Consider using std::wcspbrk() instead." },
{ L"wxStrxfrm", L"Consider using std::wcsxfrm() instead." },
{ L"wxIsEmpty", L"Consider using wxString's empty() member instead." },
{ L"wxIsdigit", L"Consider using std::iswdigit() instead." },
{ L"wxIsalnum", L"Consider using std::iswalnum() instead." },
{ L"wxIsalpha", L"Consider using std::iswalpha() instead." },
{ L"wxIsctrl", L"Consider using std::iswctrl() instead." },
{ L"wxIspunct", L"Consider using std::iswpunct() instead." },
{ L"wxIsspace", L"Consider using std::iswpspace() instead." },
{ L"wxChar", L"Consider using wchar_t instead." },
{ L"wxStrftime", L"Consider using wxDateTime's formatting functions instead." },
{ L"wxStrtod", L"Consider using wxString::ToDouble() instead." },
{ L"wxStrlen", L"Use std::wcslen() or (wrap in a std::wstring_view) instead." },
{ L"wxStrstr", L"Use std::wcsstr() instead." },
{ L"wxStrchr", L"Use std::wcschr() instead." },
{ L"wxStrdup", L"Use std::wcsdup() instead." },
{ L"wxStrcpy", L"Use std::wcscpy() instead." },
{ L"wxStrncpy", L"Use std::wcsncpy() instead." },
{ L"wxStrcat ", L"Use std::wcscat() instead." },
{ L"wxStrncat", L"Use std::wcsncat() instead." },
{ L"wxStrtok", L"Use std::wcstok() instead." },
{ L"wxStrrchr", L"Use std::wcsrchr() instead." },
{ L"wxStrpbrk", L"Use std::wcspbrk() instead." },
{ L"wxStrxfrm", L"Use std::wcsxfrm() instead." },
{ L"wxIsEmpty", L"Use wxString's empty() member instead." },
{ L"wxIsdigit", L"Use std::iswdigit() instead." },
{ L"wxIsalnum", L"Use std::iswalnum() instead." },
{ L"wxIsalpha", L"Use std::iswalpha() instead." },
{ L"wxIsctrl", L"Use std::iswctrl() instead." },
{ L"wxIspunct", L"Use std::iswpunct() instead." },
{ L"wxIsspace", L"Use std::iswpspace() instead." },
{ L"wxChar", L"Use wchar_t instead." },
{ L"wxStrftime", L"Use wxDateTime's formatting functions instead." },
{ L"wxStrtod", L"Use wxString::ToDouble() instead." },
{
L"wxTrace",
L"Use one of the wxLogTrace() functions or one of the wxVLogTrace() functions instead."
Expand All @@ -186,12 +186,13 @@ namespace i18n_check
},
{ L"wxSplitPath", L"This function is obsolete, please use wxFileName::SplitPath() instead." },
// not i18n related, just legacy wx functions that can be modernized after c++11
{ L"wxMin", L"Consider using std::min() instead." },
{ L"wxMax", L"Consider using std::max() instead." },
{ L"wxRound", L"Consider using std::lround() instead." },
{ L"wxIsNan", L"Consider using std::isnan() instead." },
{ L"wxOVERRIDE", L"Consider using override or final instead." },
{ L"wxNOEXCEPT", L"Consider using noexcept instead." },
{ L"wxMin", L"Use std::min() instead." },
{ L"wxMax", L"Use std::max() instead." },
{ L"wxRound", L"Use std::lround() instead." },
{ L"wxIsNan", L"Use std::isnan() instead." },
{ L"wxOVERRIDE", L"Use override or final instead." },
{ L"wxNOEXCEPT", L"Use noexcept instead (requires C++17)." },
{ L"wxDECLARE_NO_COPY_CLASS", L"Delete the copy CTOR and assignment operator instead." }
};

m_untranslatable_regexes = {
Expand Down

0 comments on commit 24522aa

Please sign in to comment.