diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-07 10:50:34 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-07 10:50:34 +0300 |
commit | 91694b9b58ab953f3b313be9389cc1303e472fc2 (patch) | |
tree | ae4608d519dd0a46801532630c25298bea619d7b /source/blender/io | |
parent | 58909abc685bf9ba33e8ed041ef7ff02f170bcdc (diff) |
Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
Diffstat (limited to 'source/blender/io')
54 files changed, 54 insertions, 216 deletions
diff --git a/source/blender/io/avi/AVI_avi.h b/source/blender/io/avi/AVI_avi.h index 4f3aa720da3..ba1ef9261a0 100644 --- a/source/blender/io/avi/AVI_avi.h +++ b/source/blender/io/avi/AVI_avi.h @@ -39,8 +39,7 @@ * code. So we keep it like this. */ -#ifndef __AVI_AVI_H__ -#define __AVI_AVI_H__ +#pragma once #include "BLI_sys_types.h" #include <stdio.h> /* for FILE */ @@ -295,5 +294,3 @@ AviError AVI_write_frame(AviMovie *movie, int frame_num, ...); * Unused but still external */ AviError AVI_print_error(AviError error); - -#endif /* __AVI_AVI_H__ */ diff --git a/source/blender/io/avi/intern/avi_endian.h b/source/blender/io/avi/intern/avi_endian.h index d1253f488e7..88c13d17950 100644 --- a/source/blender/io/avi/intern/avi_endian.h +++ b/source/blender/io/avi/intern/avi_endian.h @@ -23,8 +23,7 @@ * This is external code. */ -#ifndef __AVI_ENDIAN_H__ -#define __AVI_ENDIAN_H__ +#pragma once #define AVI_RAW 0 #define AVI_CHUNK 1 @@ -36,5 +35,3 @@ #define AVI_MJPEGU 7 void awrite(AviMovie *movie, void *datain, int block, int size, FILE *fp, int type); - -#endif /* __AVI_ENDIAN_H__ */ diff --git a/source/blender/io/avi/intern/avi_intern.h b/source/blender/io/avi/intern/avi_intern.h index 6ce91ce7f70..28ab999f6e3 100644 --- a/source/blender/io/avi/intern/avi_intern.h +++ b/source/blender/io/avi/intern/avi_intern.h @@ -21,8 +21,7 @@ * \ingroup avi */ -#ifndef __AVI_INTERN_H__ -#define __AVI_INTERN_H__ +#pragma once #include <stdio.h> /* for FILE */ @@ -61,5 +60,3 @@ int avi_get_data_id(AviFormat format, int stream); int avi_get_format_type(AviFormat format); int avi_get_format_fcc(AviFormat format); int avi_get_format_compression(AviFormat format); - -#endif diff --git a/source/blender/io/avi/intern/avi_mjpeg.h b/source/blender/io/avi/intern/avi_mjpeg.h index 13153fa41f0..3ee1b611f70 100644 --- a/source/blender/io/avi/intern/avi_mjpeg.h +++ b/source/blender/io/avi/intern/avi_mjpeg.h @@ -21,13 +21,10 @@ * \ingroup avi */ -#ifndef __AVI_MJPEG_H__ -#define __AVI_MJPEG_H__ +#pragma once void *avi_converter_from_mjpeg(AviMovie *movie, int stream, unsigned char *buffer, const size_t *size); void *avi_converter_to_mjpeg(AviMovie *movie, int stream, unsigned char *buffer, size_t *size); - -#endif /* __AVI_MJPEG_H__ */ diff --git a/source/blender/io/avi/intern/avi_rgb.h b/source/blender/io/avi/intern/avi_rgb.h index 3a37fad94e1..aac8a2dffbf 100644 --- a/source/blender/io/avi/intern/avi_rgb.h +++ b/source/blender/io/avi/intern/avi_rgb.h @@ -21,13 +21,10 @@ * \ingroup avi */ -#ifndef __AVI_RGB_H__ -#define __AVI_RGB_H__ +#pragma once void *avi_converter_from_avi_rgb(AviMovie *movie, int stream, unsigned char *buffer, const size_t *size); void *avi_converter_to_avi_rgb(AviMovie *movie, int stream, unsigned char *buffer, size_t *size); - -#endif /* __AVI_RGB_H__ */ diff --git a/source/blender/io/avi/intern/avi_rgb32.h b/source/blender/io/avi/intern/avi_rgb32.h index eb4b9ca4e21..675b1ced41e 100644 --- a/source/blender/io/avi/intern/avi_rgb32.h +++ b/source/blender/io/avi/intern/avi_rgb32.h @@ -21,10 +21,7 @@ * \ingroup avi */ -#ifndef __AVI_RGB32_H__ -#define __AVI_RGB32_H__ +#pragma once void *avi_converter_from_rgb32(AviMovie *movie, int stream, unsigned char *buffer, size_t *size); void *avi_converter_to_rgb32(AviMovie *movie, int stream, unsigned char *buffer, size_t *size); - -#endif /* __AVI_RGB32_H__ */ diff --git a/source/blender/io/collada/AnimationClipExporter.h b/source/blender/io/collada/AnimationClipExporter.h index 9d782eac094..a19fcb4d372 100644 --- a/source/blender/io/collada/AnimationClipExporter.h +++ b/source/blender/io/collada/AnimationClipExporter.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __ANIMATIONCLIPEXPORTER_H__ -#define __ANIMATIONCLIPEXPORTER_H__ +#pragma once #include <math.h> #include <stdio.h> @@ -49,5 +48,3 @@ class AnimationClipExporter : COLLADASW::LibraryAnimationClips { void exportAnimationClips(Scene *sce); }; - -#endif /* __ANIMATIONCLIPEXPORTER_H__ */ diff --git a/source/blender/io/collada/AnimationExporter.h b/source/blender/io/collada/AnimationExporter.h index b4564eb7b2d..48279b0c867 100644 --- a/source/blender/io/collada/AnimationExporter.h +++ b/source/blender/io/collada/AnimationExporter.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __ANIMATIONEXPORTER_H__ -#define __ANIMATIONEXPORTER_H__ +#pragma once #include <math.h> #include <stdio.h> @@ -258,5 +257,3 @@ class AnimationExporter : COLLADASW::LibraryAnimations { void export_morph_animation(Object *ob, BCAnimationSampler &sampler); #endif }; - -#endif /* __ANIMATIONEXPORTER_H__ */ diff --git a/source/blender/io/collada/AnimationImporter.h b/source/blender/io/collada/AnimationImporter.h index 51041c6ee3e..5c6f9400286 100644 --- a/source/blender/io/collada/AnimationImporter.h +++ b/source/blender/io/collada/AnimationImporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __ANIMATIONIMPORTER_H__ -#define __ANIMATIONIMPORTER_H__ +#pragma once #include <map> #include <vector> @@ -250,5 +249,3 @@ class AnimationImporter : private TransformReader, public AnimationImporterBase void extra_data_importer(std::string elementName); }; - -#endif diff --git a/source/blender/io/collada/ArmatureExporter.h b/source/blender/io/collada/ArmatureExporter.h index 3bc9dfe2639..193dc9cde3a 100644 --- a/source/blender/io/collada/ArmatureExporter.h +++ b/source/blender/io/collada/ArmatureExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __ARMATUREEXPORTER_H__ -#define __ARMATUREEXPORTER_H__ +#pragma once #include <list> #include <string> @@ -103,5 +102,3 @@ class ArmatureExporter : public COLLADASW::LibraryControllers, void write_bone_URLs(COLLADASW::InstanceController &ins, Object *ob_arm, Bone *bone); }; - -#endif diff --git a/source/blender/io/collada/ArmatureImporter.h b/source/blender/io/collada/ArmatureImporter.h index 7393b882f4b..a1c4a25b80f 100644 --- a/source/blender/io/collada/ArmatureImporter.h +++ b/source/blender/io/collada/ArmatureImporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __ARMATUREIMPORTER_H__ -#define __ARMATUREIMPORTER_H__ +#pragma once #include "COLLADAFWMorphController.h" #include "COLLADAFWNode.h" @@ -181,5 +180,3 @@ class ArmatureImporter : private TransformReader { void set_tags_map(TagsMap &tags_map); }; - -#endif diff --git a/source/blender/io/collada/BCAnimationCurve.h b/source/blender/io/collada/BCAnimationCurve.h index e0216ee6849..779678bca1d 100644 --- a/source/blender/io/collada/BCAnimationCurve.h +++ b/source/blender/io/collada/BCAnimationCurve.h @@ -17,8 +17,7 @@ * All rights reserved. */ -#ifndef __BCANIMATIONCURVE_H__ -#define __BCANIMATIONCURVE_H__ +#pragma once #include "BCSampleData.h" #include "collada_utils.h" @@ -147,5 +146,3 @@ class BCAnimationCurve { }; typedef std::map<BCCurveKey, BCAnimationCurve *> BCAnimationCurveMap; - -#endif /* __BCANIMATIONCURVE_H__ */ diff --git a/source/blender/io/collada/BCAnimationSampler.h b/source/blender/io/collada/BCAnimationSampler.h index 3273ac8e0a0..5ab4be3722c 100644 --- a/source/blender/io/collada/BCAnimationSampler.h +++ b/source/blender/io/collada/BCAnimationSampler.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __BCANIMATIONSAMPLER_H__ -#define __BCANIMATIONSAMPLER_H__ +#pragma once #include "BCAnimationCurve.h" #include "BCSampleData.h" @@ -190,5 +189,3 @@ class BCAnimationSampler { ListBase *conlist, std::set<Object *> &animated_objects); }; - -#endif /* __BCANIMATIONSAMPLER_H__ */ diff --git a/source/blender/io/collada/BCMath.h b/source/blender/io/collada/BCMath.h index 38158751740..79a0ea941cd 100644 --- a/source/blender/io/collada/BCMath.h +++ b/source/blender/io/collada/BCMath.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __BCMATH_H__ -#define __BCMATH_H__ +#pragma once #include "BlenderTypes.h" @@ -105,5 +104,3 @@ class BCMatrix { static void sanitize(DMatrix &matrix, int precision); static void transpose(Matrix &matrix); }; - -#endif /* __BCMATH_H__ */ diff --git a/source/blender/io/collada/BCSampleData.h b/source/blender/io/collada/BCSampleData.h index 6f3ca9135b3..39e34355b72 100644 --- a/source/blender/io/collada/BCSampleData.h +++ b/source/blender/io/collada/BCSampleData.h @@ -17,8 +17,7 @@ * All rights reserved. */ -#ifndef __BCSAMPLEDATA_H__ -#define __BCSAMPLEDATA_H__ +#pragma once #include <algorithm> #include <map> @@ -62,5 +61,3 @@ class BCSample { typedef std::map<Object *, BCSample *> BCSampleMap; typedef std::map<int, const BCSample *> BCFrameSampleMap; typedef std::map<int, const BCMatrix *> BCMatrixSampleMap; - -#endif /* __BCSAMPLEDATA_H__ */ diff --git a/source/blender/io/collada/BlenderContext.h b/source/blender/io/collada/BlenderContext.h index bf6fde134fa..9163b30c86f 100644 --- a/source/blender/io/collada/BlenderContext.h +++ b/source/blender/io/collada/BlenderContext.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __BLENDERCONTEXT_H__ -#define __BLENDERCONTEXT_H__ +#pragma once #include "BKE_context.h" #include "BKE_main.h" @@ -68,5 +67,3 @@ class BlenderContext { Main *get_main(); }; #endif - -#endif diff --git a/source/blender/io/collada/BlenderTypes.h b/source/blender/io/collada/BlenderTypes.h index 0e024be2374..63b0471ef6f 100644 --- a/source/blender/io/collada/BlenderTypes.h +++ b/source/blender/io/collada/BlenderTypes.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __BLENDERTYPES_H__ -#define __BLENDERTYPES_H__ +#pragma once typedef float(Vector)[3]; typedef float(Quat)[4]; @@ -44,5 +43,3 @@ typedef enum BC_global_up_axis { BC_GLOBAL_UP_MINUS_Y = 4, BC_GLOBAL_UP_MINUS_Z = 5 } BC_global_up_axis; - -#endif diff --git a/source/blender/io/collada/CameraExporter.h b/source/blender/io/collada/CameraExporter.h index 0dda6392d03..cc4f7aee165 100644 --- a/source/blender/io/collada/CameraExporter.h +++ b/source/blender/io/collada/CameraExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __CAMERAEXPORTER_H__ -#define __CAMERAEXPORTER_H__ +#pragma once #include "COLLADASWLibraryCameras.h" #include "COLLADASWStreamWriter.h" @@ -40,5 +39,3 @@ class CamerasExporter : COLLADASW::LibraryCameras { bool exportBlenderProfile(COLLADASW::Camera &cla, Camera *cam); BCExportSettings &export_settings; }; - -#endif diff --git a/source/blender/io/collada/ControllerExporter.h b/source/blender/io/collada/ControllerExporter.h index fb84af6ebc9..753538d8e98 100644 --- a/source/blender/io/collada/ControllerExporter.h +++ b/source/blender/io/collada/ControllerExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __CONTROLLEREXPORTER_H__ -#define __CONTROLLEREXPORTER_H__ +#pragma once #include <list> #include <string> @@ -133,5 +132,3 @@ class ControllerExporter : public COLLADASW::LibraryControllers, void write_bone_URLs(COLLADASW::InstanceController &ins, Object *ob_arm, Bone *bone); }; - -#endif diff --git a/source/blender/io/collada/DocumentExporter.h b/source/blender/io/collada/DocumentExporter.h index 1fe52420534..850eb4fbbb2 100644 --- a/source/blender/io/collada/DocumentExporter.h +++ b/source/blender/io/collada/DocumentExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __DOCUMENTEXPORTER_H__ -#define __DOCUMENTEXPORTER_H__ +#pragma once #include "BlenderContext.h" #include "collada.h" @@ -38,5 +37,3 @@ class DocumentExporter { BCExportSettings export_settings; KeyImageMap key_image_map; }; - -#endif diff --git a/source/blender/io/collada/DocumentImporter.h b/source/blender/io/collada/DocumentImporter.h index d9be4880b35..e382a44c3c2 100644 --- a/source/blender/io/collada/DocumentImporter.h +++ b/source/blender/io/collada/DocumentImporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __DOCUMENTIMPORTER_H__ -#define __DOCUMENTIMPORTER_H__ +#pragma once #include "COLLADAFWColor.h" #include "COLLADAFWController.h" @@ -168,5 +167,3 @@ class DocumentImporter : COLLADAFW::IWriter { void report_unknown_reference(const COLLADAFW::Node &node, const std::string object_type); }; - -#endif diff --git a/source/blender/io/collada/EffectExporter.h b/source/blender/io/collada/EffectExporter.h index 36d02bb1c8f..c844d93b040 100644 --- a/source/blender/io/collada/EffectExporter.h +++ b/source/blender/io/collada/EffectExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __EFFECTEXPORTER_H__ -#define __EFFECTEXPORTER_H__ +#pragma once #include <string> #include <vector> @@ -85,5 +84,3 @@ class EffectsExporter : COLLADASW::LibraryEffects { Scene *scene; bContext *mContext; }; - -#endif diff --git a/source/blender/io/collada/ErrorHandler.h b/source/blender/io/collada/ErrorHandler.h index 0c082a3b9dd..60253a08cda 100644 --- a/source/blender/io/collada/ErrorHandler.h +++ b/source/blender/io/collada/ErrorHandler.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __ERRORHANDLER_H__ -#define __ERRORHANDLER_H__ +#pragma once #include <algorithm> // sort() #include <map> @@ -53,5 +52,3 @@ class ErrorHandler : public COLLADASaxFWL::IErrorHandler { /** Hold error status. */ bool mError; }; - -#endif /* __ERRORHANDLER_H__ */ diff --git a/source/blender/io/collada/ExportSettings.h b/source/blender/io/collada/ExportSettings.h index 477f0b8b678..2f647cefa8b 100644 --- a/source/blender/io/collada/ExportSettings.h +++ b/source/blender/io/collada/ExportSettings.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __EXPORTSETTINGS_H__ -#define __EXPORTSETTINGS_H__ +#pragma once #include "BLI_linklist.h" #include "BlenderContext.h" @@ -291,5 +290,3 @@ class BCExportSettings { }; #endif - -#endif diff --git a/source/blender/io/collada/ExtraHandler.h b/source/blender/io/collada/ExtraHandler.h index 04ac963b530..8f98e1dec1b 100644 --- a/source/blender/io/collada/ExtraHandler.h +++ b/source/blender/io/collada/ExtraHandler.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __EXTRAHANDLER_H__ -#define __EXTRAHANDLER_H__ +#pragma once #include <algorithm> // sort() #include <map> @@ -79,5 +78,3 @@ class ExtraHandler : public COLLADASaxFWL::IExtraDataCallbackHandler { ExtraTags *currentExtraTags; std::string currentElement; }; - -#endif /* __EXTRAHANDLER_H__ */ diff --git a/source/blender/io/collada/ExtraTags.h b/source/blender/io/collada/ExtraTags.h index c806b8fa904..a72cdeb32a8 100644 --- a/source/blender/io/collada/ExtraTags.h +++ b/source/blender/io/collada/ExtraTags.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __EXTRATAGS_H__ -#define __EXTRATAGS_H__ +#pragma once #include <map> #include <string> @@ -73,5 +72,3 @@ class ExtraTags { /** Get text data for tag as a string. */ std::string asString(std::string tag, bool *ok); }; - -#endif /* __EXTRATAGS_H__ */ diff --git a/source/blender/io/collada/GeometryExporter.h b/source/blender/io/collada/GeometryExporter.h index 5090158177f..d91f3d1ec5a 100644 --- a/source/blender/io/collada/GeometryExporter.h +++ b/source/blender/io/collada/GeometryExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __GEOMETRYEXPORTER_H__ -#define __GEOMETRYEXPORTER_H__ +#pragma once #include <set> #include <string> @@ -136,5 +135,3 @@ struct GeometryFunctor { } } }; - -#endif diff --git a/source/blender/io/collada/ImageExporter.h b/source/blender/io/collada/ImageExporter.h index 20f9b95a512..e1fdcc12272 100644 --- a/source/blender/io/collada/ImageExporter.h +++ b/source/blender/io/collada/ImageExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __IMAGEEXPORTER_H__ -#define __IMAGEEXPORTER_H__ +#pragma once #include <string> #include <vector> @@ -47,5 +46,3 @@ class ImagesExporter : COLLADASW::LibraryImages { KeyImageMap &key_image_map; void export_UV_Image(Image *image, bool use_texture_copies); }; - -#endif diff --git a/source/blender/io/collada/ImportSettings.h b/source/blender/io/collada/ImportSettings.h index 608d8bff882..e8a5bf8ce81 100644 --- a/source/blender/io/collada/ImportSettings.h +++ b/source/blender/io/collada/ImportSettings.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __IMPORTSETTINGS_H__ -#define __IMPORTSETTINGS_H__ +#pragma once typedef struct ImportSettings { bool import_units; @@ -30,5 +29,3 @@ typedef struct ImportSettings { char *filepath; bool keep_bind_info; } ImportSettings; - -#endif diff --git a/source/blender/io/collada/InstanceWriter.h b/source/blender/io/collada/InstanceWriter.h index cfec1cf7006..c79d6691842 100644 --- a/source/blender/io/collada/InstanceWriter.h +++ b/source/blender/io/collada/InstanceWriter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __INSTANCEWRITER_H__ -#define __INSTANCEWRITER_H__ +#pragma once #include "COLLADASWBindMaterial.h" @@ -31,5 +30,3 @@ class InstanceWriter { Object *ob, bool active_uv_only); }; - -#endif diff --git a/source/blender/io/collada/LightExporter.h b/source/blender/io/collada/LightExporter.h index a5c7f5c6dee..90256691c06 100644 --- a/source/blender/io/collada/LightExporter.h +++ b/source/blender/io/collada/LightExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __LIGHTEXPORTER_H__ -#define __LIGHTEXPORTER_H__ +#pragma once #include "COLLADASWLibraryLights.h" #include "COLLADASWStreamWriter.h" @@ -40,5 +39,3 @@ class LightsExporter : COLLADASW::LibraryLights { bool exportBlenderProfile(COLLADASW::Light &cla, Light *la); BCExportSettings &export_settings; }; - -#endif diff --git a/source/blender/io/collada/MaterialExporter.h b/source/blender/io/collada/MaterialExporter.h index babb113567f..7d40347097c 100644 --- a/source/blender/io/collada/MaterialExporter.h +++ b/source/blender/io/collada/MaterialExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __MATERIALEXPORTER_H__ -#define __MATERIALEXPORTER_H__ +#pragma once #include <string> #include <vector> @@ -93,5 +92,3 @@ struct MaterialFunctor { gf.forEachMeshObjectInExportSet<ForEachMaterialFunctor<Functor>>(sce, matfunc, export_set); } }; - -#endif diff --git a/source/blender/io/collada/Materials.h b/source/blender/io/collada/Materials.h index e1d12246a2b..f671a00758d 100644 --- a/source/blender/io/collada/Materials.h +++ b/source/blender/io/collada/Materials.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __MATERIALS_H__ -#define __MATERIALS_H__ +#pragma once #include <map> #include <string> @@ -70,5 +69,3 @@ class MaterialNode { COLLADAFW::ColorOrTexture &cot, COLLADAFW::FloatOrParam &val); }; - -#endif /* __MATERIALS_H__ */ diff --git a/source/blender/io/collada/MeshImporter.h b/source/blender/io/collada/MeshImporter.h index 18e56e8f9df..a63cb0da987 100644 --- a/source/blender/io/collada/MeshImporter.h +++ b/source/blender/io/collada/MeshImporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __MESHIMPORTER_H__ -#define __MESHIMPORTER_H__ +#pragma once #include <map> #include <vector> @@ -177,5 +176,3 @@ class MeshImporter : public MeshImporterBase { bool write_geometry(const COLLADAFW::Geometry *geom); std::string *get_geometry_name(const std::string &mesh_name); }; - -#endif diff --git a/source/blender/io/collada/SceneExporter.h b/source/blender/io/collada/SceneExporter.h index 3ea6a9fac8e..5b8ec37152f 100644 --- a/source/blender/io/collada/SceneExporter.h +++ b/source/blender/io/collada/SceneExporter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __SCENEEXPORTER_H__ -#define __SCENEEXPORTER_H__ +#pragma once #include <math.h> #include <stdio.h> @@ -110,5 +109,3 @@ class SceneExporter : COLLADASW::LibraryVisualScenes, void writeNodeList(std::vector<Object *> &child_objects, Object *parent); void writeNode(Object *ob); }; - -#endif diff --git a/source/blender/io/collada/SkinInfo.h b/source/blender/io/collada/SkinInfo.h index e8b13f86e9c..3b94e403b6d 100644 --- a/source/blender/io/collada/SkinInfo.h +++ b/source/blender/io/collada/SkinInfo.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __SKININFO_H__ -#define __SKININFO_H__ +#pragma once #include <map> #include <vector> @@ -126,5 +125,3 @@ class SkinInfo { bool find_node_in_tree(COLLADAFW::Node *node, COLLADAFW::Node *tree_root); }; - -#endif diff --git a/source/blender/io/collada/TransformReader.h b/source/blender/io/collada/TransformReader.h index 5a778e6aba5..f8a73ce3912 100644 --- a/source/blender/io/collada/TransformReader.h +++ b/source/blender/io/collada/TransformReader.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __TRANSFORMREADER_H__ -#define __TRANSFORMREADER_H__ +#pragma once #include "COLLADAFWMatrix.h" #include "COLLADAFWNode.h" @@ -68,5 +67,3 @@ class TransformReader { void dae_scale_to_v3(COLLADAFW::Transformation *tm, float v[3]); void dae_vector3_to_v3(const COLLADABU::Math::Vector3 &v3, float v[3]); }; - -#endif diff --git a/source/blender/io/collada/TransformWriter.h b/source/blender/io/collada/TransformWriter.h index db8ef3f5ee2..200f641b064 100644 --- a/source/blender/io/collada/TransformWriter.h +++ b/source/blender/io/collada/TransformWriter.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __TRANSFORMWRITER_H__ -#define __TRANSFORMWRITER_H__ +#pragma once #include "COLLADASWNode.h" @@ -47,5 +46,3 @@ class TransformWriter { const float rot[3], const float scale[3]); }; - -#endif diff --git a/source/blender/io/collada/collada.h b/source/blender/io/collada/collada.h index d8e498ef4b2..2668be6153b 100644 --- a/source/blender/io/collada/collada.h +++ b/source/blender/io/collada/collada.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __COLLADA_H__ -#define __COLLADA_H__ +#pragma once #include <stdlib.h> @@ -46,5 +45,3 @@ int collada_export(struct bContext *C, ExportSettings *export_settings); #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/io/collada/collada_internal.h b/source/blender/io/collada/collada_internal.h index d9fe0ba0b58..de4e1d7e0d4 100644 --- a/source/blender/io/collada/collada_internal.h +++ b/source/blender/io/collada/collada_internal.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __COLLADA_INTERNAL_H__ -#define __COLLADA_INTERNAL_H__ +#pragma once #include <map> #include <string> @@ -94,5 +93,3 @@ extern std::string get_morph_id(Object *ob); extern std::string get_effect_id(Material *mat); extern std::string get_material_id(Material *mat); - -#endif /* __COLLADA_INTERNAL_H__ */ diff --git a/source/blender/io/collada/collada_utils.h b/source/blender/io/collada/collada_utils.h index 11a9376294b..657a82f70d2 100644 --- a/source/blender/io/collada/collada_utils.h +++ b/source/blender/io/collada/collada_utils.h @@ -18,8 +18,7 @@ * \ingroup collada */ -#ifndef __COLLADA_UTILS_H__ -#define __COLLADA_UTILS_H__ +#pragma once #include "COLLADAFWColorOrTexture.h" #include "COLLADAFWFloatOrDoubleArray.h" @@ -393,5 +392,3 @@ COLLADASW::ColorOrTexture bc_get_cot_from_shader(bNode *shader, COLLADASW::ColorOrTexture bc_get_cot(float r, float g, float b, float a); COLLADASW::ColorOrTexture bc_get_cot(Color col, bool with_alpha = true); - -#endif diff --git a/source/blender/io/common/IO_abstract_hierarchy_iterator.h b/source/blender/io/common/IO_abstract_hierarchy_iterator.h index d289d86b397..d0d9d72b880 100644 --- a/source/blender/io/common/IO_abstract_hierarchy_iterator.h +++ b/source/blender/io/common/IO_abstract_hierarchy_iterator.h @@ -33,8 +33,7 @@ * Selections like "selected only" or "no hair systems" are left to concrete subclasses. */ -#ifndef __ABSTRACT_HIERARCHY_ITERATOR_H__ -#define __ABSTRACT_HIERARCHY_ITERATOR_H__ +#pragma once #include "IO_dupli_persistent_id.hh" @@ -355,5 +354,3 @@ class AbstractHierarchyIterator { } // namespace io } // namespace blender - -#endif /* __ABSTRACT_HIERARCHY_ITERATOR_H__ */ diff --git a/source/blender/io/common/IO_dupli_persistent_id.hh b/source/blender/io/common/IO_dupli_persistent_id.hh index 5dc54164684..6fabafd9d51 100644 --- a/source/blender/io/common/IO_dupli_persistent_id.hh +++ b/source/blender/io/common/IO_dupli_persistent_id.hh @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2020 Blender Foundation. * All rights reserved. */ -#ifndef __IO_COMMON_DUPLI_PERSISTENT_ID_H__ -#define __IO_COMMON_DUPLI_PERSISTENT_ID_H__ +#pragma once #include "BKE_duplilist.h" @@ -64,5 +63,3 @@ class PersistentID { }; } // namespace blender::io - -#endif // __IO_COMMON_DUPLI_PARENT_FINDER_H__ diff --git a/source/blender/io/common/intern/dupli_parent_finder.hh b/source/blender/io/common/intern/dupli_parent_finder.hh index e7e628665ee..3dcf037bb5e 100644 --- a/source/blender/io/common/intern/dupli_parent_finder.hh +++ b/source/blender/io/common/intern/dupli_parent_finder.hh @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2020 Blender Foundation. * All rights reserved. */ -#ifndef __IO_COMMON_DUPLI_PARENT_FINDER_H__ -#define __IO_COMMON_DUPLI_PARENT_FINDER_H__ +#pragma once #include "IO_dupli_persistent_id.hh" @@ -58,5 +57,3 @@ class DupliParentFinder final { }; } // namespace blender::io - -#endif
\ No newline at end of file diff --git a/source/blender/io/usd/intern/usd_exporter_context.h b/source/blender/io/usd/intern/usd_exporter_context.h index 07a9d0fc0c5..5513768b527 100644 --- a/source/blender/io/usd/intern/usd_exporter_context.h +++ b/source/blender/io/usd/intern/usd_exporter_context.h @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2019 Blender Foundation. * All rights reserved. */ -#ifndef __USD_EXPORTER_CONTEXT_H__ -#define __USD_EXPORTER_CONTEXT_H__ +#pragma once #include "usd.h" @@ -44,5 +43,3 @@ struct USDExporterContext { } // namespace usd } // namespace io } // namespace blender - -#endif /* __USD_EXPORTER_CONTEXT_H__ */ diff --git a/source/blender/io/usd/intern/usd_hierarchy_iterator.h b/source/blender/io/usd/intern/usd_hierarchy_iterator.h index 2836ff0b17f..03e80ce735a 100644 --- a/source/blender/io/usd/intern/usd_hierarchy_iterator.h +++ b/source/blender/io/usd/intern/usd_hierarchy_iterator.h @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2019 Blender Foundation. * All rights reserved. */ -#ifndef __USD_HIERARCHY_ITERATOR_H__ -#define __USD_HIERARCHY_ITERATOR_H__ +#pragma once #include "IO_abstract_hierarchy_iterator.h" #include "usd.h" @@ -75,5 +74,3 @@ class USDHierarchyIterator : public AbstractHierarchyIterator { } // namespace usd } // namespace io } // namespace blender - -#endif /* __USD_HIERARCHY_ITERATOR_H__ */ diff --git a/source/blender/io/usd/intern/usd_writer_abstract.h b/source/blender/io/usd/intern/usd_writer_abstract.h index f81cf5197af..a689deaf0d8 100644 --- a/source/blender/io/usd/intern/usd_writer_abstract.h +++ b/source/blender/io/usd/intern/usd_writer_abstract.h @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2019 Blender Foundation. * All rights reserved. */ -#ifndef __USD_WRITER_ABSTRACT_H__ -#define __USD_WRITER_ABSTRACT_H__ +#pragma once #include "IO_abstract_hierarchy_iterator.h" #include "usd_exporter_context.h" @@ -78,5 +77,3 @@ class USDAbstractWriter : public AbstractHierarchyWriter { } // namespace usd } // namespace io } // namespace blender - -#endif /* __USD_WRITER_ABSTRACT_H__ */ diff --git a/source/blender/io/usd/intern/usd_writer_camera.h b/source/blender/io/usd/intern/usd_writer_camera.h index 8b5795d7d9f..1c613d7879b 100644 --- a/source/blender/io/usd/intern/usd_writer_camera.h +++ b/source/blender/io/usd/intern/usd_writer_camera.h @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2019 Blender Foundation. * All rights reserved. */ -#ifndef __USD_WRITER_CAMERA_H__ -#define __USD_WRITER_CAMERA_H__ +#pragma once #include "usd_writer_abstract.h" @@ -38,5 +37,3 @@ class USDCameraWriter : public USDAbstractWriter { } // namespace usd } // namespace io } // namespace blender - -#endif /* __USD_WRITER_CAMERA_H__ */ diff --git a/source/blender/io/usd/intern/usd_writer_hair.h b/source/blender/io/usd/intern/usd_writer_hair.h index cecacd0a355..b9a28013875 100644 --- a/source/blender/io/usd/intern/usd_writer_hair.h +++ b/source/blender/io/usd/intern/usd_writer_hair.h @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2019 Blender Foundation. * All rights reserved. */ -#ifndef __USD_WRITER_HAIR_H__ -#define __USD_WRITER_HAIR_H__ +#pragma once #include "usd_writer_abstract.h" @@ -38,5 +37,3 @@ class USDHairWriter : public USDAbstractWriter { } // namespace usd } // namespace io } // namespace blender - -#endif /* __USD_WRITER_HAIR_H__ */ diff --git a/source/blender/io/usd/intern/usd_writer_light.h b/source/blender/io/usd/intern/usd_writer_light.h index 73666622af1..082050ad071 100644 --- a/source/blender/io/usd/intern/usd_writer_light.h +++ b/source/blender/io/usd/intern/usd_writer_light.h @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2019 Blender Foundation. * All rights reserved. */ -#ifndef __USD_WRITER_LIGHT_H__ -#define __USD_WRITER_LIGHT_H__ +#pragma once #include "usd_writer_abstract.h" @@ -37,5 +36,3 @@ class USDLightWriter : public USDAbstractWriter { } // namespace usd } // namespace io } // namespace blender - -#endif /* __USD_WRITER_LIGHT_H__ */ diff --git a/source/blender/io/usd/intern/usd_writer_mesh.h b/source/blender/io/usd/intern/usd_writer_mesh.h index a14ceecfa53..078daa05501 100644 --- a/source/blender/io/usd/intern/usd_writer_mesh.h +++ b/source/blender/io/usd/intern/usd_writer_mesh.h @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2019 Blender Foundation. * All rights reserved. */ -#ifndef __USD_WRITER_MESH_H__ -#define __USD_WRITER_MESH_H__ +#pragma once #include "usd_writer_abstract.h" @@ -66,5 +65,3 @@ class USDMeshWriter : public USDGenericMeshWriter { } // namespace usd } // namespace io } // namespace blender - -#endif /* __USD_WRITER_MESH_H__ */ diff --git a/source/blender/io/usd/intern/usd_writer_metaball.h b/source/blender/io/usd/intern/usd_writer_metaball.h index 9f51a3314a5..216f5a2638f 100644 --- a/source/blender/io/usd/intern/usd_writer_metaball.h +++ b/source/blender/io/usd/intern/usd_writer_metaball.h @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2020 Blender Foundation. * All rights reserved. */ -#ifndef __USD_WRITER_METABALL_H__ -#define __USD_WRITER_METABALL_H__ +#pragma once #include "usd_writer_mesh.h" @@ -42,5 +41,3 @@ class USDMetaballWriter : public USDGenericMeshWriter { } // namespace usd } // namespace io } // namespace blender - -#endif /* __USD_WRITER_METABALL_H__ */ diff --git a/source/blender/io/usd/intern/usd_writer_transform.h b/source/blender/io/usd/intern/usd_writer_transform.h index 8b4741f1177..39a1f20e7e8 100644 --- a/source/blender/io/usd/intern/usd_writer_transform.h +++ b/source/blender/io/usd/intern/usd_writer_transform.h @@ -16,8 +16,7 @@ * The Original Code is Copyright (C) 2019 Blender Foundation. * All rights reserved. */ -#ifndef __USD_WRITER_TRANSFORM_H__ -#define __USD_WRITER_TRANSFORM_H__ +#pragma once #include "usd_writer_abstract.h" @@ -42,5 +41,3 @@ class USDTransformWriter : public USDAbstractWriter { } // namespace usd } // namespace io } // namespace blender - -#endif /* __USD_WRITER_TRANSFORM_H__ */ diff --git a/source/blender/io/usd/usd.h b/source/blender/io/usd/usd.h index eee98521289..f2826cd1d7c 100644 --- a/source/blender/io/usd/usd.h +++ b/source/blender/io/usd/usd.h @@ -17,8 +17,7 @@ * All rights reserved. */ -#ifndef __USD_H__ -#define __USD_H__ +#pragma once #include "DEG_depsgraph.h" @@ -59,5 +58,3 @@ int USD_get_version(void); #ifdef __cplusplus } #endif - -#endif /* __USD_H__ */ |