Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a))

This commit is contained in:
2014-06-17 02:47:57 +10:00
parent a6e290166b
commit f2a0062042
13 changed files with 18 additions and 17 deletions

View File

@@ -243,7 +243,7 @@ void BPY_python_start(int argc, const char **argv)
/* not essential but nice to set our name */
static wchar_t program_path_wchar[FILE_MAX]; /* python holds a reference */
BLI_strncpy_wchar_from_utf8(program_path_wchar, BLI_program_path(), sizeof(program_path_wchar) / sizeof(wchar_t));
BLI_strncpy_wchar_from_utf8(program_path_wchar, BLI_program_path(), ARRAY_SIZE(program_path_wchar));
Py_SetProgramName(program_path_wchar);
/* must run before python initializes */