Added LC_ARRAY_SIZE_CHECK for static array checks.
This commit is contained in:
@@ -1771,7 +1771,7 @@ void lcMainWindow::SetTransformType(lcTransformType TransformType)
|
||||
|
||||
mTransformType = TransformType;
|
||||
|
||||
const char* IconNames[static_cast<int>(lcTransformType::Count)] =
|
||||
constexpr const char* IconNames[] =
|
||||
{
|
||||
":/resources/edit_transform_absolute_translation.png",
|
||||
":/resources/edit_transform_relative_translation.png",
|
||||
@@ -1779,6 +1779,8 @@ void lcMainWindow::SetTransformType(lcTransformType TransformType)
|
||||
":/resources/edit_transform_relative_rotation.png"
|
||||
};
|
||||
|
||||
LC_ARRAY_SIZE_CHECK(IconNames, lcTransformType::Count);
|
||||
|
||||
int TransformIndex = static_cast<int>(TransformType);
|
||||
mActions[LC_EDIT_TRANSFORM_ABSOLUTE_TRANSLATION + TransformIndex]->setChecked(true);
|
||||
mActions[LC_EDIT_TRANSFORM]->setIcon(QIcon(IconNames[TransformIndex]));
|
||||
|
||||
Reference in New Issue
Block a user