Fix OBJECT_GUARDED_FREE compiler error when type is in namespace
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 26 Jan 2020 15:38:18 +0000 (16:38 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 27 Jan 2020 11:22:01 +0000 (12:22 +0100)
40 files changed:
intern/guardedalloc/MEM_guardedalloc.h
source/blender/alembic/intern/abc_curves.cc
source/blender/alembic/intern/abc_hair.cc
source/blender/alembic/intern/abc_mball.cc
source/blender/alembic/intern/abc_mesh.cc
source/blender/alembic/intern/abc_nurbs.cc
source/blender/alembic/intern/alembic_capi.cc
source/blender/collada/BCAnimationCurve.h
source/blender/collada/DocumentExporter.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/collada/MeshImporter.cpp
source/blender/collada/collada_utils.cpp
source/blender/compositor/operations/COM_CompositorOperation.cpp
source/blender/compositor/operations/COM_ImageOperation.h
source/blender/compositor/operations/COM_OutputFileOperation.cpp
source/blender/compositor/operations/COM_PreviewOperation.cpp
source/blender/compositor/operations/COM_RenderLayersProg.h
source/blender/compositor/operations/COM_SplitOperation.cpp
source/blender/compositor/operations/COM_TextureOperation.h
source/blender/compositor/operations/COM_ViewerOperation.cpp
source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
source/blender/freestyle/intern/system/PythonInterpreter.h
source/blender/imbuf/intern/oiio/openimageio_api.cpp
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/physics/intern/BPH_mass_spring.cpp
source/blender/usd/intern/usd_capi.cc
tests/gtests/blenlib/BLI_array_store_test.cc
tests/gtests/blenlib/BLI_delaunay_2d_test.cc
tests/gtests/blenlib/BLI_ghash_performance_test.cc
tests/gtests/blenlib/BLI_heap_simple_test.cc
tests/gtests/blenlib/BLI_heap_test.cc
tests/gtests/blenlib/BLI_kdopbvh_test.cc
tests/gtests/blenlib/BLI_listbase_test.cc
tests/gtests/blenlib/BLI_memiter_test.cc
tests/gtests/blenlib/BLI_polyfill_2d_test.cc
tests/gtests/blenlib/BLI_task_performance_test.cc
tests/gtests/blenlib/BLI_task_test.cc
tests/gtests/blenloader/blendfile_loading_base_test.cc

index b1a0eda0e229b4af53e2b4722fe3fe5c2430119b..958e5ae86cd5a4bf6c3a2f70c4ad55f7a9200fe5 100644 (file)
@@ -230,6 +230,10 @@ extern const char *(*MEM_name_ptr)(void *vmemh);
 /* Switch allocator to slower but fully guarded mode. */
 void MEM_use_guarded_allocator(void);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #ifdef __cplusplus
 /* alloc funcs for C++ only */
 #  define MEM_CXX_CLASS_ALLOC_FUNCS(_id) \
@@ -253,6 +257,13 @@ void MEM_use_guarded_allocator(void);
         MEM_freeN(mem); \
     }
 
+/* Needed when type includes a namespace, then the namespace should not be
+ * specified after ~, so using a macro fails. */
+template<class T> inline void OBJECT_GUARDED_DESTRUCTOR(T *what)
+{
+  what->~T();
+}
+
 #  if defined __GNUC__
 #    define OBJECT_GUARDED_NEW(type, args...) new (MEM_mallocN(sizeof(type), __func__)) type(args)
 #  else
@@ -262,15 +273,11 @@ void MEM_use_guarded_allocator(void);
 #  define OBJECT_GUARDED_DELETE(what, type) \
     { \
       if (what) { \
-        ((type *)(what))->~type(); \
+        OBJECT_GUARDED_DESTRUCTOR((type *)what); \
         MEM_freeN(what); \
       } \
     } \
     (void)0
 #endif /* __cplusplus */
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
 #endif /* __MEM_GUARDEDALLOC_H__ */
index 50aa13bea4f06fd8c0a8f78ff4d392dcf506cf12..3b143356c0448fa4f9598ed466edf5784ee47b6e 100644 (file)
@@ -28,9 +28,9 @@
 #include "abc_transform.h"
 #include "abc_util.h"
 
-extern "C" {
 #include "MEM_guardedalloc.h"
 
+extern "C" {
 #include "DNA_curve_types.h"
 #include "DNA_object_types.h"
 
index 98387be2e613e691150aafaa35552b8dc62012c1..7eaecd271f4d01f09f7f6a1d7faf56c7d543038c 100644 (file)
@@ -25,9 +25,9 @@
 #include "abc_transform.h"
 #include "abc_util.h"
 
-extern "C" {
 #include "MEM_guardedalloc.h"
 
+extern "C" {
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_modifier_types.h"
index 732ceffe4673877458b4eae3414d48d61a4cc839..db4b9d82ebfbe49cc8bb46e8d998529b3fc81f68 100644 (file)
@@ -22,6 +22,8 @@
 #include "abc_mesh.h"
 #include "abc_transform.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "DNA_meta_types.h"
 #include "DNA_mesh_types.h"
@@ -35,7 +37,6 @@ extern "C" {
 #include "BKE_object.h"
 
 #include "DEG_depsgraph.h"
-#include "MEM_guardedalloc.h"
 }
 
 AbcMBallWriter::AbcMBallWriter(Main *bmain,
index edcb6263da3f85aacbc14069e05fe12711d968d7..3eee390d7d33e0a686ba42e977d03caad4f73592 100644 (file)
@@ -25,6 +25,8 @@
 #include "abc_transform.h"
 #include "abc_util.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "DNA_material_types.h"
 #include "DNA_mesh_types.h"
@@ -46,8 +48,6 @@ extern "C" {
 #include "BKE_modifier.h"
 #include "BKE_object.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "WM_api.h"
 #include "WM_types.h"
 
index 739276dffa6c6e56fd1c6b2e1bf39efd601b7b96..c11ca7d57b93cfdb0de4074256f2c0ff779fcfed 100644 (file)
@@ -23,9 +23,9 @@
 #include "abc_transform.h"
 #include "abc_util.h"
 
-extern "C" {
 #include "MEM_guardedalloc.h"
 
+extern "C" {
 #include "DNA_curve_types.h"
 #include "DNA_object_types.h"
 
index 5efa8c8a446bd4e8a40bab2943c23c9f1c34347c..5519cbef53cf9d4698477a5d672eefdd0ad80ef4 100644 (file)
@@ -32,9 +32,9 @@
 #include "abc_transform.h"
 #include "abc_util.h"
 
-extern "C" {
 #include "MEM_guardedalloc.h"
 
+extern "C" {
 #include "DNA_cachefile_types.h"
 #include "DNA_curve_types.h"
 #include "DNA_modifier_types.h"
index 4651290ea0f67f380bdd14ffd3d5da84feb81879..7b523ac53caa2bdf7b34687d72fb1771bdc146a9 100644 (file)
@@ -23,8 +23,9 @@
 #include "collada_utils.h"
 #include "BCSampleData.h"
 
-extern "C" {
 #include "MEM_guardedalloc.h"
+
+extern "C" {
 #include "BKE_fcurve.h"
 #include "BKE_armature.h"
 #include "BKE_material.h"
index 0ebcd6d0919f8b89dedd4aabec9c54b4874202c3..24a960ab287922f1f8708ebbf368bebf27ea3ee7 100644 (file)
@@ -56,6 +56,8 @@
 #include "COLLADASWInstanceNode.h"
 #include "COLLADASWBaseInputElement.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
@@ -99,8 +101,6 @@ extern char build_commit_time[];
 extern char build_hash[];
 #endif
 
-#include "MEM_guardedalloc.h"
-
 #include "RNA_access.h"
 }
 
index 30e41a8d72035c15c8dd76082f32cda659b28cda..f2c52b125a4b946e07049cbb291fdf874b5ddeb8 100644 (file)
@@ -43,6 +43,8 @@
 #include "COLLADASaxFWLLoader.h"
 #include "COLLADASaxFWLIExtraDataCallbackHandler.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_listbase.h"
 #include "BLI_math.h"
@@ -68,8 +70,6 @@ extern "C" {
 
 #include "RNA_access.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "WM_api.h"
 #include "WM_types.h"
 }
index e02a7a014f1d83d9fe55ed5d64795d165834af3a..8ed30a0dc811ac8689d2c775159f97a11f5ad23b 100644 (file)
@@ -31,6 +31,8 @@
 #include "COLLADAFWMeshVertexData.h"
 #include "COLLADAFWPolygons.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BKE_customdata.h"
 #include "BKE_displist.h"
@@ -44,8 +46,6 @@ extern "C" {
 #include "BLI_math.h"
 #include "BLI_string.h"
 #include "BLI_edgehash.h"
-
-#include "MEM_guardedalloc.h"
 }
 
 #include "ArmatureImporter.h"
index d5011581204ea9212c75ebdecaba6d440bc38303..5db4609c7c2bed2fce3234b871f8b907bb71a4f1 100644 (file)
@@ -27,6 +27,9 @@
 
 #include <set>
 #include <string>
+
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "DNA_modifier_types.h"
 #include "DNA_customdata_types.h"
@@ -62,8 +65,6 @@ extern "C" {
 #include "ED_node.h"
 #include "ED_object.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "WM_api.h" /* XXX hrm, see if we can do without this */
 #include "WM_types.h"
 
index 5bd466658c0e527fbd7bb1b696a96aff87ab77df..ff9fc7dbcbc4cda0f4f3254a3a026b6438f173c6 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "COM_CompositorOperation.h"
+#include "MEM_guardedalloc.h"
 #include "BLI_listbase.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
@@ -26,7 +27,6 @@ extern "C" {
 #include "RE_pipeline.h"
 #include "RE_shader_ext.h"
 #include "RE_render_ext.h"
-#include "MEM_guardedalloc.h"
 #include "render_types.h"
 }
 #include "PIL_time.h"
index e03173dca8d15e35cc6235f7ad6b452ccdd3376a..6237d336c74d9b8faf10db4625a1bdf204bb6ccf 100644 (file)
 #define __COM_IMAGEOPERATION_H__
 
 #include "COM_NodeOperation.h"
+#include "MEM_guardedalloc.h"
 #include "BLI_listbase.h"
 #include "BKE_image.h"
 extern "C" {
 #include "RE_pipeline.h"
 #include "RE_shader_ext.h"
 #include "RE_render_ext.h"
-#include "MEM_guardedalloc.h"
 }
 
 /**
index c06994d7cdbcf53ff380a1425a9a4d12c48c351e..334eab6ef9566c303e959a96c32dc47101afb281 100644 (file)
@@ -30,9 +30,9 @@
 #include "BKE_scene.h"
 
 #include "DNA_color_types.h"
+#include "MEM_guardedalloc.h"
 
 extern "C" {
-#include "MEM_guardedalloc.h"
 #include "IMB_imbuf.h"
 #include "IMB_colormanagement.h"
 #include "IMB_imbuf_types.h"
index cd2bb3b2928a8529c94caad8d4bcfd67314a9a96..b91c3324f87918d666654d687c204ddddad691eb 100644 (file)
@@ -26,8 +26,8 @@
 #include "BLI_math_color.h"
 #include "COM_defines.h"
 #include "BLI_math.h"
-extern "C" {
 #include "MEM_guardedalloc.h"
+extern "C" {
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
 #include "IMB_colormanagement.h"
index 5aa7e87976079323dcfff531225f18f76be452fb..ca7c18a05862956c663902461647917d4f04ff72 100644 (file)
 #define __COM_RENDERLAYERSPROG_H__
 
 #include "COM_NodeOperation.h"
+#include "MEM_guardedalloc.h"
 #include "DNA_scene_types.h"
 #include "BLI_listbase.h"
 #include "BKE_image.h"
 extern "C" {
 #include "RE_pipeline.h"
-#include "MEM_guardedalloc.h"
 }
 
 /**
index 24978acc8f31726455ca19f563038e6a23edfd50..437b20d14d4a11f7ed18ae3e806aea6c7b5922ec 100644 (file)
@@ -22,9 +22,9 @@
 #include "BLI_utildefines.h"
 #include "BLI_math_color.h"
 #include "BLI_math_vector.h"
+#include "MEM_guardedalloc.h"
 
 extern "C" {
-#include "MEM_guardedalloc.h"
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
 }
index 934b6f8683fc7b0b0fe34cda86f532c392db6701..6b44c11f42328df45e1e199420e6a4d051d2a4f0 100644 (file)
 #include "COM_NodeOperation.h"
 #include "DNA_texture_types.h"
 #include "BLI_listbase.h"
+#include "MEM_guardedalloc.h"
 extern "C" {
 #include "RE_pipeline.h"
 #include "RE_shader_ext.h"
 #include "RE_render_ext.h"
-#include "MEM_guardedalloc.h"
 }
 
 /**
index b6caf52a9f7ef951f9197821889832749e7254a6..50b508dafb10318f4481d13c7943abe5e77cadf4 100644 (file)
@@ -26,9 +26,9 @@
 #include "BLI_utildefines.h"
 #include "BLI_math_color.h"
 #include "BLI_math_vector.h"
+#include "MEM_guardedalloc.h"
 
 extern "C" {
-#include "MEM_guardedalloc.h"
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
 #include "IMB_colormanagement.h"
index dc6677bdcf47a2965def417a71e3e79eba400ce1..8b125828fdcda373a9a08b0da5d6c275014ce481 100644 (file)
@@ -35,9 +35,9 @@
 #include "../system/FreestyleConfig.h"
 #include "../system/RenderMonitor.h"
 
-extern "C" {
 #include "MEM_guardedalloc.h"
 
+extern "C" {
 #include "DNA_material_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
index 06087cd7fa6bf4ae2ce7118bbab0f5e3be8047aa..56ff733483fd6e2eaa5c129cc56e3e9f1a3c95ec 100644 (file)
@@ -23,9 +23,9 @@
 #include "../application/AppConfig.h"
 #include "../stroke/Canvas.h"
 
-extern "C" {
 #include "MEM_guardedalloc.h"
 
+extern "C" {
 #include "RNA_access.h"
 #include "RNA_types.h"
 
index 07839ac6e610eda454993058d919779372583d92..0567bd0df06bfea2c9ba92852314ea83eb01a82b 100644 (file)
 using namespace std;
 using namespace Freestyle;
 
-extern "C" {
-
 #include "MEM_guardedalloc.h"
 
+extern "C" {
+
 #include "DNA_camera_types.h"
 #include "DNA_collection_types.h"
 #include "DNA_freestyle_types.h"
index 1fed6a004639250ffa50fae37aa5a67927dbea5a..255a1b2a15270a70a5b56a01b0a9beb8f28ad777 100644 (file)
@@ -31,10 +31,10 @@ extern "C" {
 #include "StringUtils.h"
 #include "Interpreter.h"
 
-// soc
-extern "C" {
 #include "MEM_guardedalloc.h"
 
+// soc
+extern "C" {
 #include "DNA_text_types.h"
 
 #include "BKE_context.h"
index d2147f833c3a41f0e3361beb9d04d96c25eb5c02..e001b8b21c4b84f399949d555bc8969a597f4915 100644 (file)
@@ -33,9 +33,9 @@
 #include "openimageio_api.h"
 #include <OpenImageIO/imageio.h>
 
-extern "C" {
 #include "MEM_guardedalloc.h"
 
+extern "C" {
 #include "BLI_blenlib.h"
 
 #include "IMB_imbuf_types.h"
index 88dfa42a41689341b0dfafbfbda97775d60a8bad..e1513169736bb95d91ac6d69dd753670a60ec6ec 100644 (file)
@@ -65,6 +65,8 @@
 #  include "utfconv.h"
 #endif
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 
 // The following prevents a linking error in debug mode for MSVC using the libs in CVS
@@ -74,8 +76,6 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void)
 }
 #endif
 
-#include "MEM_guardedalloc.h"
-
 #include "BLI_blenlib.h"
 #include "BLI_math_color.h"
 #include "BLI_threads.h"
index fcfd713e6be240cb748917c4e776bb5d214fc453..8f079a75f14ad1bcfa396422f58e27d515223444 100644 (file)
@@ -21,9 +21,9 @@
  * \ingroup bph
  */
 
-extern "C" {
 #include "MEM_guardedalloc.h"
 
+extern "C" {
 #include "DNA_cloth_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_object_force_types.h"
index 502f86771744d73594f15dc64a118f7ee6df8620..f83917003248b79f94ea96fc00cf77e6e92388fc 100644 (file)
@@ -23,6 +23,8 @@
 #include <pxr/usd/usd/stage.h>
 #include <pxr/usd/usdGeom/tokens.h>
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "DEG_depsgraph.h"
 #include "DEG_depsgraph_build.h"
@@ -39,8 +41,6 @@ extern "C" {
 #include "BLI_path_util.h"
 #include "BLI_string.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "WM_api.h"
 #include "WM_types.h"
 }
index 632107c69df4a541df1ffe8ae099097779db49eb..3bca66b613edc111db63a9f40b0d55fb456a7e0d 100644 (file)
@@ -2,10 +2,10 @@
 
 #include "testing/testing.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_array_store.h"
-
-#include "MEM_guardedalloc.h"
 #include "BLI_sys_types.h"
 #include "BLI_utildefines.h"
 #include "BLI_listbase.h"
index 85e8ae3f141fc9c63e5ee244cd5e4ccf5a274802..946dc03eca3e363c5966afea5f632ea6d47a2841 100644 (file)
@@ -2,8 +2,9 @@
 
 #include "testing/testing.h"
 
-extern "C" {
 #include "MEM_guardedalloc.h"
+
+extern "C" {
 #include "BLI_math.h"
 #include "BLI_rand.h"
 #include "PIL_time.h"
index ba995e5014f69f0302c62d91442105adb58681b0..58dd9998733991e9814770bddc5fe15d5bc1ab2f 100644 (file)
@@ -5,8 +5,9 @@
 
 #define GHASH_INTERNAL_API
 
-extern "C" {
 #include "MEM_guardedalloc.h"
+
+extern "C" {
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLI_rand.h"
index 16e1ecbf9cf6672c0be7e3672287fc546f6f6c3c..bad5c40eb66ee0f1b24bd0b7b1599ba058e56675 100644 (file)
@@ -3,14 +3,14 @@
 #include "testing/testing.h"
 #include <string.h>
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_sys_types.h"
 #include "BLI_compiler_attrs.h"
 #include "BLI_heap_simple.h"
 #include "BLI_utildefines.h"
 #include "BLI_rand.h"
-
-#include "MEM_guardedalloc.h"
 };
 
 #define SIZE 1024
index 884093435e4ca74857f17c77539f47db00bd6805..ddec706eb0e9d42f20167efea2537bc7798ab473 100644 (file)
@@ -3,13 +3,13 @@
 #include "testing/testing.h"
 #include <string.h>
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_compiler_attrs.h"
 #include "BLI_heap.h"
 #include "BLI_utildefines.h"
 #include "BLI_rand.h"
-
-#include "MEM_guardedalloc.h"
 };
 
 #define SIZE 1024
index 7e32c545e75fc39ab09683d185523a02bf2a7b06..e0762f228406995381883006196cc426eefaf8dc 100644 (file)
@@ -4,12 +4,13 @@
 
 /* TODO: ray intersection, overlap ... etc.*/
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_compiler_attrs.h"
 #include "BLI_kdopbvh.h"
 #include "BLI_rand.h"
 #include "BLI_math_vector.h"
-#include "MEM_guardedalloc.h"
 }
 
 #include "stubs/bf_intern_eigen_stubs.h"
index e5919c5dfb10adc2df9a41564651af08d6e8d7bc..5ecf0533763f3d5b3d7e11064a7c96ef024e5e6c 100644 (file)
@@ -2,11 +2,11 @@
 
 #include "testing/testing.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_array_utils.h"
 #include "BLI_listbase.h"
-#include "MEM_guardedalloc.h"
-
 #include "BLI_string.h"
 #include "BLI_path_util.h"
 #include "BLI_ressource_strings.h"
index d92daefff3b0f36762d994aa660ba7c78e42b8a0..07ef0745845975b48c204f04d11bf7590bbb8ba8 100644 (file)
@@ -2,10 +2,11 @@
 
 #include "testing/testing.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_array_utils.h"
 #include "BLI_memiter.h"
-#include "MEM_guardedalloc.h"
 
 #include "BLI_string.h"
 #include "BLI_ressource_strings.h"
index 5566dced798ee8c546d828a50b790337c7cb357b..264ed8fadbcc1b4fe411e3461a43c082f66b0893 100644 (file)
@@ -9,13 +9,14 @@
 #define USE_COMBINATIONS_ALL
 #define USE_BEAUTIFY
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_utildefines.h"
 #include "BLI_array_utils.h"
 #include "BLI_polyfill_2d.h"
 #include "BLI_edgehash.h"
 #include "BLI_math.h"
-#include "MEM_guardedalloc.h"
 
 #ifdef USE_OBJ_PREVIEW
 #  include "BLI_string.h"
index 84b7b8b643912635d1fa9e159814eb1aef4f4cc5..c5af75f1eb22381d83ac5f276fa30fe1ba5c9088 100644 (file)
@@ -7,6 +7,8 @@
 
 #define GHASH_INTERNAL_API
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_utildefines.h"
 
@@ -15,8 +17,6 @@ extern "C" {
 #include "BLI_task.h"
 
 #include "PIL_time.h"
-
-#include "MEM_guardedalloc.h"
 }
 
 #define NUM_RUN_AVERAGED 100
index a682e8aedf684f8170c4d4280f25f6bf81aef6ec..d4ab9de13c411a603b1dbdb853a10ed0c4dea208 100644 (file)
@@ -5,14 +5,14 @@
 
 #include "atomic_ops.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BLI_utildefines.h"
 
 #include "BLI_listbase.h"
 #include "BLI_mempool.h"
 #include "BLI_task.h"
-
-#include "MEM_guardedalloc.h"
 };
 
 #define NUM_ITEMS 10000
index 7af3293d706ff53dbed656ee1a4f59159574d447..c4e873c255f13bc423357d1809fbaf2f5ba37d64 100644 (file)
@@ -17,6 +17,8 @@
  */
 #include "blendfile_loading_base_test.h"
 
+#include "MEM_guardedalloc.h"
+
 extern "C" {
 #include "BKE_appdir.h"
 #include "BKE_blender.h"
@@ -41,8 +43,6 @@ extern "C" {
 
 #include "IMB_imbuf.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "RNA_define.h"
 
 #include "WM_api.h"