diff --git a/modules/terraman_2d/defines.h b/modules/terraman_2d/defines.h index fb00c1698..60b2b0ca2 100644 --- a/modules/terraman_2d/defines.h +++ b/modules/terraman_2d/defines.h @@ -1,6 +1,5 @@ #ifndef TERRAIN_2D_DEFINES_H #define TERRAIN_2D_DEFINES_H -#define VARIANT_ARRAY_GET(arr) /*************************************************************************/ /* defines.h */ @@ -33,11 +32,12 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -Vector r; -for (int i = 0; i < arr.size(); i++) { - r.push_back(arr[i].get_ref_ptr()); -} -return r; +#define VARIANT_ARRAY_GET(arr) \ + Vector r; \ + for (int i = 0; i < arr.size(); i++) { \ + r.push_back(arr[i].get_ref_ptr()); \ + } \ + return r; #define VARIANT_ARRAY_SET(arr, arr_into, type) \ arr_into.clear(); \