Cleanup: avoid shadowing, redundant assignment & minor changes

Quiet cppecheck warnings, use const pointers, ELEM(..) macro,
replace NULL -> nullptr, unsigned int -> uint.
This commit is contained in:
Campbell Barton
2024-07-07 00:03:57 +10:00
parent 7bce839e25
commit 48383cf20e
14 changed files with 25 additions and 23 deletions

View File

@@ -53,7 +53,7 @@ PyC_StringEnumItems bpygpu_dataformat_items[] = {
/** \name Utilities
* \{ */
bool bpygpu_is_init_or_error(void)
bool bpygpu_is_init_or_error()
{
if (!GPU_is_init()) {
PyErr_SetString(PyExc_SystemError,

View File

@@ -634,7 +634,7 @@ static PyObject *app_translations_pgettext_n(BlenderAppTranslations * /*self*/,
PyObject *args,
PyObject *kw)
{
static const char *kwlist[] = {"msgid", "msgctxt", NULL};
static const char *kwlist[] = {"msgid", "msgctxt", nullptr};
PyObject *msgid, *msgctxt;
// (void)_pgettext;