Fix: Compiler warning in macro after recent C++ conversion

The iterator parameters struct should be initialized to zero in both
C and C++. Using memset seems to be the only reliable way to do that.
This commit is contained in:
Hans Goudey 2022-08-17 13:16:48 -04:00
parent 27f2ff6b5b
commit 31279d522b
1 changed files with 2 additions and 1 deletions

View File

@ -354,7 +354,8 @@ void BKE_view_layer_visible_bases_iterator_end(BLI_Iterator *iter);
#define FOREACH_BASE_IN_MODE_BEGIN(_view_layer, _v3d, _object_type, _object_mode, _instance) \
{ \
struct ObjectsInModeIteratorData data_ = {NULL}; \
struct ObjectsInModeIteratorData data_; \
memset(&data_, 0, sizeof(data_)); \
data_.object_mode = _object_mode; \
data_.object_type = _object_type; \
data_.view_layer = _view_layer; \