diff --git a/.clang-format b/.clang-format index d80476dfae..7f0d9e798f 100644 --- a/.clang-format +++ b/.clang-format @@ -66,7 +66,7 @@ BraceWrapping: # AfterEnum: false # AfterExternBlock: false # AfterFunction: false - AfterNamespace: true +# AfterNamespace: false # AfterObjCDeclaration: false # AfterStruct: false # AfterUnion: false @@ -77,7 +77,7 @@ BraceWrapping: # IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false - SplitEmptyNamespace: false +# SplitEmptyNamespace: true BreakAfterAttributes: Always BreakAfterJavaFieldAnnotations: true BreakArrays: false diff --git a/core/type_info.h b/core/type_info.h index 65763eea16..b40527e25a 100644 --- a/core/type_info.h +++ b/core/type_info.h @@ -326,8 +326,7 @@ struct TypeInherits { && !TypesAreSame::value; }; -namespace GodotTypeInfo -{ +namespace GodotTypeInfo { enum Metadata { METADATA_NONE, METADATA_INT_IS_INT8, diff --git a/drivers/png/png_driver_common.cpp b/drivers/png/png_driver_common.cpp index 6542736f48..b814e14d6f 100644 --- a/drivers/png/png_driver_common.cpp +++ b/drivers/png/png_driver_common.cpp @@ -11,8 +11,7 @@ #include #include -namespace PNGDriverCommon -{ +namespace PNGDriverCommon { // Print any warnings. // On error, set explain and return true. diff --git a/drivers/png/png_driver_common.h b/drivers/png/png_driver_common.h index 753d5ed9bc..83bf7bbd95 100644 --- a/drivers/png/png_driver_common.h +++ b/drivers/png/png_driver_common.h @@ -10,8 +10,7 @@ #include "core/image.h" #include "core/pool_vector.h" -namespace PNGDriverCommon -{ +namespace PNGDriverCommon { // Attempt to load png from buffer (p_source, p_size) into p_image Error png_to_image( diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 3cfbfaa28b..9f81c09c59 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -449,8 +449,7 @@ void TileMapEditor::_sbox_input(const Ref& p_ie) { // Implementation detail of TileMapEditor::_update_palette(); // In modern C++ this could have been inside its body. -namespace -{ +namespace { struct _PaletteEntry { int id; String name; diff --git a/main/tests/test_astar.cpp b/main/tests/test_astar.cpp index 913dd45be3..1381524b0f 100644 --- a/main/tests/test_astar.cpp +++ b/main/tests/test_astar.cpp @@ -13,8 +13,7 @@ #include #include -namespace TestAStar -{ +namespace TestAStar { class ABCX : public AStar { public: diff --git a/main/tests/test_astar.h b/main/tests/test_astar.h index 3a080201e3..9b4316ea8b 100644 --- a/main/tests/test_astar.h +++ b/main/tests/test_astar.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestAStar -{ +namespace TestAStar { MainLoop* test(); } // namespace TestAStar diff --git a/main/tests/test_basis.cpp b/main/tests/test_basis.cpp index 7e405e764b..1c499d068b 100644 --- a/main/tests/test_basis.cpp +++ b/main/tests/test_basis.cpp @@ -10,8 +10,7 @@ #include "core/os/os.h" #include "core/ustring.h" -namespace TestBasis -{ +namespace TestBasis { enum RotOrder { EulerXYZ, diff --git a/main/tests/test_basis.h b/main/tests/test_basis.h index c3ac9863bb..11d06cf480 100644 --- a/main/tests/test_basis.h +++ b/main/tests/test_basis.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestBasis -{ +namespace TestBasis { MainLoop* test(); } // namespace TestBasis diff --git a/main/tests/test_crypto.cpp b/main/tests/test_crypto.cpp index 1bb513a372..82d895d991 100644 --- a/main/tests/test_crypto.cpp +++ b/main/tests/test_crypto.cpp @@ -7,8 +7,7 @@ #include "core/crypto/crypto.h" #include "core/os/os.h" -namespace TestCrypto -{ +namespace TestCrypto { class _MockCrypto : public Crypto { virtual PoolByteArray generate_random_bytes(int p_bytes) { diff --git a/main/tests/test_crypto.h b/main/tests/test_crypto.h index d7b4f8c081..1c177d3862 100644 --- a/main/tests/test_crypto.h +++ b/main/tests/test_crypto.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestCrypto -{ +namespace TestCrypto { MainLoop* test(); } // namespace TestCrypto diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp index 60e4c38bec..bef9115fa6 100644 --- a/main/tests/test_gdscript.cpp +++ b/main/tests/test_gdscript.cpp @@ -17,8 +17,7 @@ #include "modules/gdscript/gdscript_parser.h" #include "modules/gdscript/gdscript_tokenizer.h" -namespace TestGDScript -{ +namespace TestGDScript { static void _print_indent(int p_ident, const String& p_text) { String txt; @@ -1139,8 +1138,7 @@ MainLoop* test(TestType p_type) { #else -namespace TestGDScript -{ +namespace TestGDScript { MainLoop* test(TestType p_type) { ERR_PRINT( diff --git a/main/tests/test_gdscript.h b/main/tests/test_gdscript.h index c793eb251f..fdcc049698 100644 --- a/main/tests/test_gdscript.h +++ b/main/tests/test_gdscript.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestGDScript -{ +namespace TestGDScript { enum TestType { TEST_TOKENIZER, diff --git a/main/tests/test_gui.cpp b/main/tests/test_gui.cpp index 92ad439bbe..ce4e7d17a6 100644 --- a/main/tests/test_gui.cpp +++ b/main/tests/test_gui.cpp @@ -31,8 +31,7 @@ #include "scene/main/scene_tree.h" #include "scene/main/viewport.h" -namespace TestGUI -{ +namespace TestGUI { class TestMainLoop : public SceneTree { public: diff --git a/main/tests/test_gui.h b/main/tests/test_gui.h index cdfbb52818..21ebb24b6f 100644 --- a/main/tests/test_gui.h +++ b/main/tests/test_gui.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestGUI -{ +namespace TestGUI { MainLoop* test(); } // namespace TestGUI diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp index 20e5b1b3b6..bf87900807 100644 --- a/main/tests/test_math.cpp +++ b/main/tests/test_math.cpp @@ -22,8 +22,7 @@ #include "scene/resources/texture.h" #include "servers/visual/shader_language.h" -namespace TestMath -{ +namespace TestMath { class GetClassAndNamespace { String code; diff --git a/main/tests/test_math.h b/main/tests/test_math.h index f9998d804a..59853e92fb 100644 --- a/main/tests/test_math.h +++ b/main/tests/test_math.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestMath -{ +namespace TestMath { MainLoop* test(); } // namespace TestMath diff --git a/main/tests/test_oa_hash_map.cpp b/main/tests/test_oa_hash_map.cpp index db07319db5..6633a654de 100644 --- a/main/tests/test_oa_hash_map.cpp +++ b/main/tests/test_oa_hash_map.cpp @@ -9,8 +9,7 @@ #include "core/oa_hash_map.h" #include "core/os/os.h" -namespace TestOAHashMap -{ +namespace TestOAHashMap { struct CountedItem { static int count; diff --git a/main/tests/test_oa_hash_map.h b/main/tests/test_oa_hash_map.h index cd951e55ff..df6bf5a492 100644 --- a/main/tests/test_oa_hash_map.h +++ b/main/tests/test_oa_hash_map.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestOAHashMap -{ +namespace TestOAHashMap { MainLoop* test(); } // namespace TestOAHashMap diff --git a/main/tests/test_ordered_hash_map.cpp b/main/tests/test_ordered_hash_map.cpp index 698eaaddde..bbd52fe8a9 100644 --- a/main/tests/test_ordered_hash_map.cpp +++ b/main/tests/test_ordered_hash_map.cpp @@ -11,8 +11,7 @@ #include "core/pair.h" #include "core/vector.h" -namespace TestOrderedHashMap -{ +namespace TestOrderedHashMap { bool test_insert() { OrderedHashMap map; diff --git a/main/tests/test_ordered_hash_map.h b/main/tests/test_ordered_hash_map.h index 5b7ce2bf4b..687c06be68 100644 --- a/main/tests/test_ordered_hash_map.h +++ b/main/tests/test_ordered_hash_map.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestOrderedHashMap -{ +namespace TestOrderedHashMap { MainLoop* test(); } // namespace TestOrderedHashMap diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp index c6d77da58b..1d3f05e175 100644 --- a/main/tests/test_physics.cpp +++ b/main/tests/test_physics.cpp @@ -463,8 +463,7 @@ class TestPhysicsMainLoop : public MainLoop { TestPhysicsMainLoop() {} }; -namespace TestPhysics -{ +namespace TestPhysics { MainLoop* test() { return memnew(TestPhysicsMainLoop); diff --git a/main/tests/test_physics.h b/main/tests/test_physics.h index b66bc7cea5..a94982acea 100644 --- a/main/tests/test_physics.h +++ b/main/tests/test_physics.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestPhysics -{ +namespace TestPhysics { MainLoop* test(); } // namespace TestPhysics diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp index 6cda188c30..d42acc64e0 100644 --- a/main/tests/test_physics_2d.cpp +++ b/main/tests/test_physics_2d.cpp @@ -579,8 +579,7 @@ class TestPhysics2DMainLoop : public MainLoop { TestPhysics2DMainLoop() {} }; -namespace TestPhysics2D -{ +namespace TestPhysics2D { MainLoop* test() { return memnew(TestPhysics2DMainLoop); diff --git a/main/tests/test_physics_2d.h b/main/tests/test_physics_2d.h index e6248f3724..5a5e346abe 100644 --- a/main/tests/test_physics_2d.h +++ b/main/tests/test_physics_2d.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestPhysics2D -{ +namespace TestPhysics2D { MainLoop* test(); } // namespace TestPhysics2D diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp index b18a4bbc4f..1908ee53d9 100644 --- a/main/tests/test_render.cpp +++ b/main/tests/test_render.cpp @@ -16,8 +16,7 @@ #define OBJECT_COUNT 50 -namespace TestRender -{ +namespace TestRender { class TestMainLoop : public MainLoop { RID test_cube; diff --git a/main/tests/test_render.h b/main/tests/test_render.h index fe6f690988..e567078627 100644 --- a/main/tests/test_render.h +++ b/main/tests/test_render.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestRender -{ +namespace TestRender { MainLoop* test(); } // namespace TestRender diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp index 5f642dc98d..4ca1584d0f 100644 --- a/main/tests/test_shader_lang.cpp +++ b/main/tests/test_shader_lang.cpp @@ -16,8 +16,7 @@ typedef ShaderLanguage SL; -namespace TestShaderLang -{ +namespace TestShaderLang { static String _mktab(int p_level) { String tb; diff --git a/main/tests/test_shader_lang.h b/main/tests/test_shader_lang.h index b763e704ea..17c55cd1fe 100644 --- a/main/tests/test_shader_lang.h +++ b/main/tests/test_shader_lang.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestShaderLang -{ +namespace TestShaderLang { MainLoop* test(); } // namespace TestShaderLang diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp index ad63bc768f..8460b12631 100644 --- a/main/tests/test_string.cpp +++ b/main/tests/test_string.cpp @@ -17,8 +17,7 @@ #include #include -namespace TestString -{ +namespace TestString { bool test_1() { OS::get_singleton()->print("\n\nTest 1: Assign from cstr\n"); diff --git a/main/tests/test_string.h b/main/tests/test_string.h index 78217e9069..9df286eadb 100644 --- a/main/tests/test_string.h +++ b/main/tests/test_string.h @@ -10,8 +10,7 @@ #include "core/os/main_loop.h" #include "core/ustring.h" -namespace TestString -{ +namespace TestString { MainLoop* test(); } // namespace TestString diff --git a/main/tests/test_transform.cpp b/main/tests/test_transform.cpp index 22bfae5ab2..2eac77aece 100644 --- a/main/tests/test_transform.cpp +++ b/main/tests/test_transform.cpp @@ -14,8 +14,7 @@ // #define GODOT_TEST_TRANSFORM_NON_UNIFORM_SCALE_TESTS_ENABLED -namespace TestTransform -{ +namespace TestTransform { bool test_plane() { bool pass = true; diff --git a/main/tests/test_transform.h b/main/tests/test_transform.h index fbcbbafe03..34087c4c5c 100644 --- a/main/tests/test_transform.h +++ b/main/tests/test_transform.h @@ -9,8 +9,7 @@ #include "core/os/main_loop.h" -namespace TestTransform -{ +namespace TestTransform { MainLoop* test(); } // namespace TestTransform diff --git a/main/tests/test_xml_parser.cpp b/main/tests/test_xml_parser.cpp index 8f53fbbdfa..d3b4490537 100644 --- a/main/tests/test_xml_parser.cpp +++ b/main/tests/test_xml_parser.cpp @@ -8,8 +8,7 @@ #include "core/os/os.h" -namespace TestXMLParser -{ +namespace TestXMLParser { #define CHECK(X) \ if (!(X)) { \ OS::get_singleton()->print("\tFAIL at %s\n", #X); \ diff --git a/main/tests/test_xml_parser.h b/main/tests/test_xml_parser.h index 4a1373ba4d..912bf6a917 100644 --- a/main/tests/test_xml_parser.h +++ b/main/tests/test_xml_parser.h @@ -14,8 +14,7 @@ #include -namespace TestXMLParser -{ +namespace TestXMLParser { MainLoop* test(); } // namespace TestXMLParser diff --git a/modules/fbx/fbx_parser/ByteSwapper.h b/modules/fbx/fbx_parser/ByteSwapper.h index 18b1de6b9b..f26f98e7a8 100644 --- a/modules/fbx/fbx_parser/ByteSwapper.h +++ b/modules/fbx/fbx_parser/ByteSwapper.h @@ -55,8 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -namespace FBXDocParser -{ +namespace FBXDocParser { // -------------------------------------------------------------------------------------- /** Defines some useful byte order swap routines. * @@ -219,8 +218,7 @@ struct ByteSwap::_swapper { #define LE_NCONST #endif -namespace Intern -{ +namespace Intern { // -------------------------------------------------------------------------------------------- template diff --git a/modules/fbx/fbx_parser/FBXAnimation.cpp b/modules/fbx/fbx_parser/FBXAnimation.cpp index 2925f7d719..9d9ca8c503 100644 --- a/modules/fbx/fbx_parser/FBXAnimation.cpp +++ b/modules/fbx/fbx_parser/FBXAnimation.cpp @@ -56,8 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "FBXDocumentUtil.h" #include "FBXParser.h" -namespace FBXDocParser -{ +namespace FBXDocParser { using namespace Util; diff --git a/modules/fbx/fbx_parser/FBXBinaryTokenizer.cpp b/modules/fbx/fbx_parser/FBXBinaryTokenizer.cpp index 071fc221db..3ef4bc8bd4 100644 --- a/modules/fbx/fbx_parser/FBXBinaryTokenizer.cpp +++ b/modules/fbx/fbx_parser/FBXBinaryTokenizer.cpp @@ -57,8 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace FBXDocParser -{ +namespace FBXDocParser { // ------------------------------------------------------------------------------------------------ Token::Token( const char* sbegin, @@ -78,8 +77,7 @@ Token::Token( // measure from sBegin to sEnd and validate? } -namespace -{ +namespace { // ------------------------------------------------------------------------------------------------ // signal tokenization error diff --git a/modules/fbx/fbx_parser/FBXCommon.h b/modules/fbx/fbx_parser/FBXCommon.h index e476c72b2a..b6c9b343bf 100644 --- a/modules/fbx/fbx_parser/FBXCommon.h +++ b/modules/fbx/fbx_parser/FBXCommon.h @@ -53,8 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace FBXDocParser -{ +namespace FBXDocParser { const std::string NULL_RECORD = { // 13 null bytes '\0', '\0', diff --git a/modules/fbx/fbx_parser/FBXDeformer.cpp b/modules/fbx/fbx_parser/FBXDeformer.cpp index 7da6fdadc8..5f09b08e2e 100644 --- a/modules/fbx/fbx_parser/FBXDeformer.cpp +++ b/modules/fbx/fbx_parser/FBXDeformer.cpp @@ -58,8 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace FBXDocParser -{ +namespace FBXDocParser { using namespace Util; diff --git a/modules/fbx/fbx_parser/FBXDocument.cpp b/modules/fbx/fbx_parser/FBXDocument.cpp index d216a98441..c0c1f38e2a 100644 --- a/modules/fbx/fbx_parser/FBXDocument.cpp +++ b/modules/fbx/fbx_parser/FBXDocument.cpp @@ -64,8 +64,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -namespace FBXDocParser -{ +namespace FBXDocParser { using namespace Util; diff --git a/modules/fbx/fbx_parser/FBXDocument.h b/modules/fbx/fbx_parser/FBXDocument.h index 37645fd57d..a56ad8d86c 100644 --- a/modules/fbx/fbx_parser/FBXDocument.h +++ b/modules/fbx/fbx_parser/FBXDocument.h @@ -24,8 +24,7 @@ #define _AI_CONCAT(a, b) a##b #define AI_CONCAT(a, b) _AI_CONCAT(a, b) -namespace FBXDocParser -{ +namespace FBXDocParser { class Parser; class Object; @@ -1447,8 +1446,7 @@ class Document { } // namespace FBXDocParser -namespace std -{ +namespace std { template <> struct hash { std::size_t operator()(const FBXDocParser::Video& video) const { diff --git a/modules/fbx/fbx_parser/FBXDocumentUtil.cpp b/modules/fbx/fbx_parser/FBXDocumentUtil.cpp index c70ca3e021..cf32752448 100644 --- a/modules/fbx/fbx_parser/FBXDocumentUtil.cpp +++ b/modules/fbx/fbx_parser/FBXDocumentUtil.cpp @@ -58,10 +58,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "FBXUtil.h" #include "core/print_string.h" -namespace FBXDocParser -{ -namespace Util -{ +namespace FBXDocParser { +namespace Util { void DOMError(const std::string& message) { print_error("[FBX-DOM]" + String(message.c_str())); diff --git a/modules/fbx/fbx_parser/FBXDocumentUtil.h b/modules/fbx/fbx_parser/FBXDocumentUtil.h index 2f8c03b8b9..9e9b562f07 100644 --- a/modules/fbx/fbx_parser/FBXDocumentUtil.h +++ b/modules/fbx/fbx_parser/FBXDocumentUtil.h @@ -58,10 +58,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. struct Token; struct Element; -namespace FBXDocParser -{ -namespace Util -{ +namespace FBXDocParser { +namespace Util { // Parser errors void DOMError(const std::string& message); diff --git a/modules/fbx/fbx_parser/FBXImportSettings.h b/modules/fbx/fbx_parser/FBXImportSettings.h index 9d29e6944a..a03a7cc4fd 100644 --- a/modules/fbx/fbx_parser/FBXImportSettings.h +++ b/modules/fbx/fbx_parser/FBXImportSettings.h @@ -52,8 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef FBX_IMPORT_SETTINGS_H #define FBX_IMPORT_SETTINGS_H -namespace FBXDocParser -{ +namespace FBXDocParser { /** FBX import settings, parts of which are publicly accessible via their * corresponding AI_CONFIG constants */ diff --git a/modules/fbx/fbx_parser/FBXMaterial.cpp b/modules/fbx/fbx_parser/FBXMaterial.cpp index 698b29b39c..d32c5b384b 100644 --- a/modules/fbx/fbx_parser/FBXMaterial.cpp +++ b/modules/fbx/fbx_parser/FBXMaterial.cpp @@ -59,8 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include // std::transform -namespace FBXDocParser -{ +namespace FBXDocParser { using namespace Util; diff --git a/modules/fbx/fbx_parser/FBXMeshGeometry.cpp b/modules/fbx/fbx_parser/FBXMeshGeometry.cpp index d81275106e..4380e30bf6 100644 --- a/modules/fbx/fbx_parser/FBXMeshGeometry.cpp +++ b/modules/fbx/fbx_parser/FBXMeshGeometry.cpp @@ -59,8 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace FBXDocParser -{ +namespace FBXDocParser { using namespace Util; diff --git a/modules/fbx/fbx_parser/FBXMeshGeometry.h b/modules/fbx/fbx_parser/FBXMeshGeometry.h index a7d5f30d88..e2ebb3be69 100644 --- a/modules/fbx/fbx_parser/FBXMeshGeometry.h +++ b/modules/fbx/fbx_parser/FBXMeshGeometry.h @@ -61,8 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define AI_MAX_NUMBER_OF_TEXTURECOORDS 4 #define AI_MAX_NUMBER_OF_COLOR_SETS 8 -namespace FBXDocParser -{ +namespace FBXDocParser { /* * DOM base class for all kinds of FBX geometry diff --git a/modules/fbx/fbx_parser/FBXModel.cpp b/modules/fbx/fbx_parser/FBXModel.cpp index cc417a4655..77b35b8ee6 100644 --- a/modules/fbx/fbx_parser/FBXModel.cpp +++ b/modules/fbx/fbx_parser/FBXModel.cpp @@ -55,8 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "FBXMeshGeometry.h" #include "FBXParser.h" -namespace FBXDocParser -{ +namespace FBXDocParser { using namespace Util; diff --git a/modules/fbx/fbx_parser/FBXNodeAttribute.cpp b/modules/fbx/fbx_parser/FBXNodeAttribute.cpp index 120930f2ba..8b40dfdf9e 100644 --- a/modules/fbx/fbx_parser/FBXNodeAttribute.cpp +++ b/modules/fbx/fbx_parser/FBXNodeAttribute.cpp @@ -56,8 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace FBXDocParser -{ +namespace FBXDocParser { using namespace Util; // ------------------------------------------------------------------------------------------------ diff --git a/modules/fbx/fbx_parser/FBXParser.cpp b/modules/fbx/fbx_parser/FBXParser.cpp index 815df11ff8..6db34a413f 100644 --- a/modules/fbx/fbx_parser/FBXParser.cpp +++ b/modules/fbx/fbx_parser/FBXParser.cpp @@ -65,8 +65,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace FBXDocParser; -namespace -{ +namespace { // Initially, we did reinterpret_cast, breaking strict aliasing rules. // This actually caused trouble on Android, so let's be safe this time. @@ -83,8 +82,7 @@ T SafeParse(const char* data, const char* end) { } } // namespace -namespace FBXDocParser -{ +namespace FBXDocParser { // ------------------------------------------------------------------------------------------------ Element::Element(const TokenPtr key_token, Parser& parser) : @@ -511,8 +509,7 @@ std::string ParseTokenAsString(const TokenPtr t, const char*& err_out) { return std::string(s + 1, length - 2); } -namespace -{ +namespace { // ------------------------------------------------------------------------------------------------ // read the type code and element count of a binary data array and stop there diff --git a/modules/fbx/fbx_parser/FBXParser.h b/modules/fbx/fbx_parser/FBXParser.h index 640a51adf5..c76f9aa5e4 100644 --- a/modules/fbx/fbx_parser/FBXParser.h +++ b/modules/fbx/fbx_parser/FBXParser.h @@ -62,8 +62,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -namespace FBXDocParser -{ +namespace FBXDocParser { class Scope; class Parser; diff --git a/modules/fbx/fbx_parser/FBXPose.cpp b/modules/fbx/fbx_parser/FBXPose.cpp index 51ed0e9283..372716c617 100644 --- a/modules/fbx/fbx_parser/FBXPose.cpp +++ b/modules/fbx/fbx_parser/FBXPose.cpp @@ -55,8 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace FBXDocParser -{ +namespace FBXDocParser { class FbxPoseNode; diff --git a/modules/fbx/fbx_parser/FBXProperties.cpp b/modules/fbx/fbx_parser/FBXProperties.cpp index cb60c421a3..f86e91d776 100644 --- a/modules/fbx/fbx_parser/FBXProperties.cpp +++ b/modules/fbx/fbx_parser/FBXProperties.cpp @@ -56,8 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "FBXParser.h" #include "FBXTokenizer.h" -namespace FBXDocParser -{ +namespace FBXDocParser { using namespace Util; @@ -67,8 +66,7 @@ Property::Property() {} // ------------------------------------------------------------------------------------------------ Property::~Property() {} -namespace -{ +namespace { // ------------------------------------------------------------------------------------------------ // read a typed property out of a FBX element. The return value is NULL if the diff --git a/modules/fbx/fbx_parser/FBXProperties.h b/modules/fbx/fbx_parser/FBXProperties.h index 91f0a218d5..308bd7ae1c 100644 --- a/modules/fbx/fbx_parser/FBXProperties.h +++ b/modules/fbx/fbx_parser/FBXProperties.h @@ -59,8 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -namespace FBXDocParser -{ +namespace FBXDocParser { // Forward declarations class Element; diff --git a/modules/fbx/fbx_parser/FBXTokenizer.cpp b/modules/fbx/fbx_parser/FBXTokenizer.cpp index 3dc75124c7..c558cf24cc 100644 --- a/modules/fbx/fbx_parser/FBXTokenizer.cpp +++ b/modules/fbx/fbx_parser/FBXTokenizer.cpp @@ -57,8 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "core/print_string.h" -namespace FBXDocParser -{ +namespace FBXDocParser { // ------------------------------------------------------------------------------------------------ Token::Token( @@ -81,8 +80,7 @@ Token::Token( // ------------------------------------------------------------------------------------------------ Token::~Token() {} -namespace -{ +namespace { // ------------------------------------------------------------------------------------------------ void TokenizeError( diff --git a/modules/fbx/fbx_parser/FBXTokenizer.h b/modules/fbx/fbx_parser/FBXTokenizer.h index bb446d6f2d..4a061b7267 100644 --- a/modules/fbx/fbx_parser/FBXTokenizer.h +++ b/modules/fbx/fbx_parser/FBXTokenizer.h @@ -60,8 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -namespace FBXDocParser -{ +namespace FBXDocParser { /** Rough classification for text FBX tokens used for constructing the * basic scope hierarchy. */ enum TokenType { diff --git a/modules/fbx/fbx_parser/FBXUtil.cpp b/modules/fbx/fbx_parser/FBXUtil.cpp index ee2cb7b6a9..dffad9d2fd 100644 --- a/modules/fbx/fbx_parser/FBXUtil.cpp +++ b/modules/fbx/fbx_parser/FBXUtil.cpp @@ -57,10 +57,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -namespace FBXDocParser -{ -namespace Util -{ +namespace FBXDocParser { +namespace Util { // ------------------------------------------------------------------------------------------------ const char* TokenTypeString(TokenType t) { diff --git a/modules/fbx/fbx_parser/FBXUtil.h b/modules/fbx/fbx_parser/FBXUtil.h index a859d391c4..7c160ad7f2 100644 --- a/modules/fbx/fbx_parser/FBXUtil.h +++ b/modules/fbx/fbx_parser/FBXUtil.h @@ -56,11 +56,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace FBXDocParser -{ +namespace FBXDocParser { -namespace Util -{ +namespace Util { /** Get a string representation for a #TokenType. */ const char* TokenTypeString(TokenType t); diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp index f544681190..f69bc3e353 100644 --- a/modules/gdscript/language_server/lsp.hpp +++ b/modules/gdscript/language_server/lsp.hpp @@ -11,8 +11,7 @@ #include "core/list.h" #include "editor/docs/docs_data.h" -namespace lsp -{ +namespace lsp { typedef String DocumentUri; @@ -349,8 +348,7 @@ struct Command { // Use namespace instead of enumeration to follow the LSP specifications // lsp::EnumName::EnumValue is OK but lsp::EnumValue is not -namespace TextDocumentSyncKind -{ +namespace TextDocumentSyncKind { /** * Documents should not be synced at all. */ @@ -661,8 +659,7 @@ struct TextDocumentContentChangeEvent { }; // Use namespace instead of enumeration to follow the LSP specifications -namespace DiagnosticSeverity -{ +namespace DiagnosticSeverity { /** * Reports an error. */ @@ -769,8 +766,7 @@ struct Diagnostic { * Please note that `MarkupKinds` must not start with a `$`. This kinds * are reserved for internal usage. */ -namespace MarkupKind -{ +namespace MarkupKind { static const String PlainText = "plaintext"; static const String Markdown = "markdown"; }; // namespace MarkupKind @@ -837,8 +833,7 @@ struct MarkupContent { /** * The kind of a completion entry. */ -namespace CompletionItemKind -{ +namespace CompletionItemKind { static const int Text = 1; static const int Method = 2; static const int Function = 3; @@ -871,8 +866,7 @@ static const int TypeParameter = 25; * Defines whether the insert text in a completion item should be interpreted as * plain text or a snippet. */ -namespace InsertTextFormat -{ +namespace InsertTextFormat { /** * The primary text to be inserted is treated as a plain string. */ @@ -1089,8 +1083,7 @@ struct CompletionList { /** * A symbol kind. */ -namespace SymbolKind -{ +namespace SymbolKind { static const int File = 1; static const int Module = 2; static const int Namespace = 3; @@ -1374,8 +1367,7 @@ struct NativeSymbolInspectParams { /** * Enum of known range kinds */ -namespace FoldingRangeKind -{ +namespace FoldingRangeKind { /** * Folding range for a comment */ @@ -1438,8 +1430,7 @@ struct FoldingRange { /** * How a completion was triggered */ -namespace CompletionTriggerKind -{ +namespace CompletionTriggerKind { /** * Completion was triggered by typing an identifier (24x7 code * complete), manual invocation (e.g Ctrl+Space) or via API. diff --git a/modules/mono/editor/code_completion.cpp b/modules/mono/editor/code_completion.cpp index d49d5b2f09..7b24b191eb 100644 --- a/modules/mono/editor/code_completion.cpp +++ b/modules/mono/editor/code_completion.cpp @@ -12,8 +12,7 @@ #include "scene/gui/control.h" #include "scene/main/node.h" -namespace gdmono -{ +namespace gdmono { // Almost everything here is taken from functions used by GDScript for code // completion, adapted for C#. diff --git a/modules/mono/editor/code_completion.h b/modules/mono/editor/code_completion.h index a871fb769b..81626b43ba 100644 --- a/modules/mono/editor/code_completion.h +++ b/modules/mono/editor/code_completion.h @@ -10,8 +10,7 @@ #include "core/ustring.h" #include "core/variant.h" -namespace gdmono -{ +namespace gdmono { enum class CompletionKind { INPUT_ACTIONS = 0, diff --git a/modules/mono/editor/csharp_project.cpp b/modules/mono/editor/csharp_project.cpp index c9c05b2e59..d290e49c17 100644 --- a/modules/mono/editor/csharp_project.cpp +++ b/modules/mono/editor/csharp_project.cpp @@ -17,8 +17,7 @@ #include "core/project_settings.h" #include "script_class_parser.h" -namespace CSharpProject -{ +namespace CSharpProject { void add_item( const String& p_project_path, diff --git a/modules/mono/editor/csharp_project.h b/modules/mono/editor/csharp_project.h index 4afdfcef29..c6a4978701 100644 --- a/modules/mono/editor/csharp_project.h +++ b/modules/mono/editor/csharp_project.h @@ -9,8 +9,7 @@ #include "core/ustring.h" -namespace CSharpProject -{ +namespace CSharpProject { void add_item( const String& p_project_path, diff --git a/modules/mono/editor/godotsharp_export.cpp b/modules/mono/editor/godotsharp_export.cpp index 5fa51b151e..8578581ef4 100644 --- a/modules/mono/editor/godotsharp_export.cpp +++ b/modules/mono/editor/godotsharp_export.cpp @@ -16,8 +16,7 @@ #include -namespace GodotSharpExport -{ +namespace GodotSharpExport { MonoAssemblyName* new_mono_assembly_name() { // Mono has no public API to create an empty MonoAssemblyName and the struct diff --git a/modules/mono/editor/godotsharp_export.h b/modules/mono/editor/godotsharp_export.h index a622e50d53..41d3bc5073 100644 --- a/modules/mono/editor/godotsharp_export.h +++ b/modules/mono/editor/godotsharp_export.h @@ -12,8 +12,7 @@ #include "core/error_list.h" #include "core/ustring.h" -namespace GodotSharpExport -{ +namespace GodotSharpExport { Error get_assembly_dependencies( GDMonoAssembly* p_assembly, diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp index 49240710cc..5eaf72822f 100644 --- a/modules/mono/godotsharp_dirs.cpp +++ b/modules/mono/godotsharp_dirs.cpp @@ -21,8 +21,7 @@ #include "mono_gd/gd_mono.h" -namespace GodotSharpDirs -{ +namespace GodotSharpDirs { String _get_expected_build_config() { #ifdef TOOLS_ENABLED diff --git a/modules/mono/godotsharp_dirs.h b/modules/mono/godotsharp_dirs.h index 280dcc4604..f60ba9d610 100644 --- a/modules/mono/godotsharp_dirs.h +++ b/modules/mono/godotsharp_dirs.h @@ -9,8 +9,7 @@ #include "core/ustring.h" -namespace GodotSharpDirs -{ +namespace GodotSharpDirs { String get_res_data_dir(); String get_res_metadata_dir(); diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp index 500cd2cb6d..d7419a5fe5 100644 --- a/modules/mono/mono_gd/gd_mono.cpp +++ b/modules/mono/mono_gd/gd_mono.cpp @@ -54,8 +54,7 @@ GDMono* GDMono::singleton = NULL; -namespace -{ +namespace { #if defined(WEB_ENABLED) extern "C" { @@ -522,8 +521,7 @@ bool GDMono::_are_api_assemblies_out_of_sync() { return out_of_sync; } -namespace GodotSharpBindings -{ +namespace GodotSharpBindings { #ifdef MONO_GLUE_ENABLED uint64_t get_core_api_hash(); diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h index 543f976a85..433ebb205f 100644 --- a/modules/mono/mono_gd/gd_mono.h +++ b/modules/mono/mono_gd/gd_mono.h @@ -16,8 +16,7 @@ #include "../utils/mono_reg_utils.h" #endif -namespace ApiAssemblyInfo -{ +namespace ApiAssemblyInfo { enum Type { API_CORE, API_EDITOR @@ -303,8 +302,7 @@ class GDMono { ~GDMono(); }; -namespace gdmono -{ +namespace gdmono { class ScopeDomain { MonoDomain* prev_domain; diff --git a/modules/mono/mono_gd/gd_mono_cache.cpp b/modules/mono/mono_gd/gd_mono_cache.cpp index 1255a36da0..786340ceae 100644 --- a/modules/mono/mono_gd/gd_mono_cache.cpp +++ b/modules/mono/mono_gd/gd_mono_cache.cpp @@ -12,8 +12,7 @@ #include "gd_mono_method.h" #include "gd_mono_utils.h" -namespace GDMonoCache -{ +namespace GDMonoCache { CachedData cached_data; diff --git a/modules/mono/mono_gd/gd_mono_cache.h b/modules/mono/mono_gd/gd_mono_cache.h index 7da15fe21e..4cdf4c586f 100644 --- a/modules/mono/mono_gd/gd_mono_cache.h +++ b/modules/mono/mono_gd/gd_mono_cache.h @@ -10,8 +10,7 @@ #include "gd_mono_header.h" #include "gd_mono_method_thunk.h" -namespace GDMonoCache -{ +namespace GDMonoCache { struct CachedData { // ----------------------------------------------- diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp index eca0b9f39a..78cb44ae9c 100644 --- a/modules/mono/mono_gd/gd_mono_internals.cpp +++ b/modules/mono/mono_gd/gd_mono_internals.cpp @@ -16,8 +16,7 @@ #include -namespace GDMonoInternals -{ +namespace GDMonoInternals { void tie_managed_to_unmanaged(MonoObject* managed, Object* unmanaged) { // This method should not fail diff --git a/modules/mono/mono_gd/gd_mono_internals.h b/modules/mono/mono_gd/gd_mono_internals.h index 6531c40a6b..f71eb03181 100644 --- a/modules/mono/mono_gd/gd_mono_internals.h +++ b/modules/mono/mono_gd/gd_mono_internals.h @@ -12,8 +12,7 @@ #include -namespace GDMonoInternals -{ +namespace GDMonoInternals { void tie_managed_to_unmanaged(MonoObject* managed, Object* unmanaged); /** diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp index 83ad768e44..caadf73028 100644 --- a/modules/mono/mono_gd/gd_mono_marshal.cpp +++ b/modules/mono/mono_gd/gd_mono_marshal.cpp @@ -10,8 +10,7 @@ #include "gd_mono_cache.h" #include "gd_mono_class.h" -namespace GDMonoMarshal -{ +namespace GDMonoMarshal { Variant::Type managed_to_variant_type(const ManagedType& p_type) { switch (p_type.type_encoding) { diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h index a9aed68df5..963be5d287 100644 --- a/modules/mono/mono_gd/gd_mono_marshal.h +++ b/modules/mono/mono_gd/gd_mono_marshal.h @@ -11,8 +11,7 @@ #include "gd_mono.h" #include "gd_mono_utils.h" -namespace GDMonoMarshal -{ +namespace GDMonoMarshal { template T unbox(MonoObject* p_obj) { @@ -203,8 +202,7 @@ PoolVector3Array mono_array_to_PoolVector3Array(MonoArray* p_array); // Structures -namespace InteropLayout -{ +namespace InteropLayout { enum { MATCHES_float = (sizeof(float) == sizeof(uint32_t)), diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index b187967242..f6b89fa97a 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -26,8 +26,7 @@ #include "gd_mono_marshal.h" #include "gd_mono_method_thunk.h" -namespace GDMonoUtils -{ +namespace GDMonoUtils { MonoObject* unmanaged_get_managed(Object* unmanaged) { if (!unmanaged) { @@ -613,8 +612,7 @@ void dispose(MonoObject* p_mono_object, MonoException** r_exc) { CACHED_METHOD_THUNK(GodotObject, Dispose).invoke(p_mono_object, r_exc); } -namespace Marshal -{ +namespace Marshal { #ifdef MONO_GLUE_ENABLED #ifdef TOOLS_ENABLED diff --git a/modules/mono/mono_gd/gd_mono_utils.h b/modules/mono/mono_gd/gd_mono_utils.h index 2091d9043b..fa5f7ceb15 100644 --- a/modules/mono/mono_gd/gd_mono_utils.h +++ b/modules/mono/mono_gd/gd_mono_utils.h @@ -26,11 +26,9 @@ GD_UNREACHABLE(); \ } -namespace GDMonoUtils -{ +namespace GDMonoUtils { -namespace Marshal -{ +namespace Marshal { bool type_is_generic_array(MonoReflectionType* p_reftype); bool type_is_generic_dictionary(MonoReflectionType* p_reftype); diff --git a/modules/mono/mono_gd/gd_mono_wasm_m2n.cpp b/modules/mono/mono_gd/gd_mono_wasm_m2n.cpp index 38d63c1edd..5333c9d1f7 100644 --- a/modules/mono/mono_gd/gd_mono_wasm_m2n.cpp +++ b/modules/mono/mono_gd/gd_mono_wasm_m2n.cpp @@ -21,8 +21,7 @@ MONO_API void godot_mono_register_m2n_icall_trampoline_dispatch_hook( GodotMonoM2nIcallTrampolineDispatch hook ); -namespace GDMonoWasmM2n -{ +namespace GDMonoWasmM2n { struct HashMapCookieComparator { static bool compare(const char* p_lhs, const char* p_rhs) { diff --git a/modules/mono/mono_gd/gd_mono_wasm_m2n.h b/modules/mono/mono_gd/gd_mono_wasm_m2n.h index e0fdf2b5be..64ed45fa31 100644 --- a/modules/mono/mono_gd/gd_mono_wasm_m2n.h +++ b/modules/mono/mono_gd/gd_mono_wasm_m2n.h @@ -32,8 +32,7 @@ struct Mono_InterpMethodArguments { }; } // extern "C" -namespace GDMonoWasmM2n -{ +namespace GDMonoWasmM2n { template struct IndexSequence {}; diff --git a/modules/mono/mono_gd/support/android_support.cpp b/modules/mono/mono_gd/support/android_support.cpp index fcce9b34f7..42683f7f65 100644 --- a/modules/mono/mono_gd/support/android_support.cpp +++ b/modules/mono/mono_gd/support/android_support.cpp @@ -31,12 +31,9 @@ // Warning: JNI boilerplate ahead... continue at your own risk -namespace gdmono -{ -namespace android -{ -namespace support -{ +namespace gdmono { +namespace android { +namespace support { template struct ScopedLocalRef { diff --git a/modules/mono/mono_gd/support/android_support.h b/modules/mono/mono_gd/support/android_support.h index 253320459e..efc8be0fb6 100644 --- a/modules/mono/mono_gd/support/android_support.h +++ b/modules/mono/mono_gd/support/android_support.h @@ -11,12 +11,9 @@ #include "core/ustring.h" -namespace gdmono -{ -namespace android -{ -namespace support -{ +namespace gdmono { +namespace android { +namespace support { String get_app_native_lib_dir(); diff --git a/modules/mono/mono_gd/support/ios_support.h b/modules/mono/mono_gd/support/ios_support.h index 10f03eeee4..17bdd2a172 100644 --- a/modules/mono/mono_gd/support/ios_support.h +++ b/modules/mono/mono_gd/support/ios_support.h @@ -11,12 +11,9 @@ #include "core/ustring.h" -namespace gdmono -{ -namespace ios -{ -namespace support -{ +namespace gdmono { +namespace ios { +namespace support { void initialize(); void cleanup(); diff --git a/modules/mono/mono_gd/support/ios_support.mm b/modules/mono/mono_gd/support/ios_support.mm index 29936ac3ad..c3ac84a185 100644 --- a/modules/mono/mono_gd/support/ios_support.mm +++ b/modules/mono/mono_gd/support/ios_support.mm @@ -20,12 +20,9 @@ // Definition generated by the Godot exporter extern "C" void gd_mono_setup_aot(); -namespace gdmono -{ -namespace ios -{ -namespace support -{ +namespace gdmono { +namespace ios { +namespace support { void ios_mono_log_callback( const char* log_domain, diff --git a/modules/mono/signal_awaiter_utils.cpp b/modules/mono/signal_awaiter_utils.cpp index 6b735bf307..a9229e849c 100644 --- a/modules/mono/signal_awaiter_utils.cpp +++ b/modules/mono/signal_awaiter_utils.cpp @@ -12,8 +12,7 @@ #include "mono_gd/gd_mono_marshal.h" #include "mono_gd/gd_mono_utils.h" -namespace SignalAwaiterUtils -{ +namespace SignalAwaiterUtils { Error connect_signal_awaiter( Object* p_source, diff --git a/modules/mono/signal_awaiter_utils.h b/modules/mono/signal_awaiter_utils.h index ecbfdec8c1..8f70c55384 100644 --- a/modules/mono/signal_awaiter_utils.h +++ b/modules/mono/signal_awaiter_utils.h @@ -10,8 +10,7 @@ #include "core/reference.h" #include "mono_gc_handle.h" -namespace SignalAwaiterUtils -{ +namespace SignalAwaiterUtils { Error connect_signal_awaiter( Object* p_source, diff --git a/modules/mono/utils/macros.h b/modules/mono/utils/macros.h index 67c64eddde..5418790208 100644 --- a/modules/mono/utils/macros.h +++ b/modules/mono/utils/macros.h @@ -60,8 +60,7 @@ } while (true); #endif -namespace gdmono -{ +namespace gdmono { template struct ScopeExit { diff --git a/modules/mono/utils/mono_reg_utils.cpp b/modules/mono/utils/mono_reg_utils.cpp index b95908dc1a..38753d73cd 100644 --- a/modules/mono/utils/mono_reg_utils.cpp +++ b/modules/mono/utils/mono_reg_utils.cpp @@ -15,8 +15,7 @@ #define WIN32_LEAN_AND_MEAN #include -namespace MonoRegUtils -{ +namespace MonoRegUtils { template REGSAM bitness_sam_impl(); diff --git a/modules/mono/utils/mono_reg_utils.h b/modules/mono/utils/mono_reg_utils.h index ac5233bcd6..d4d1dbbf65 100644 --- a/modules/mono/utils/mono_reg_utils.h +++ b/modules/mono/utils/mono_reg_utils.h @@ -19,8 +19,7 @@ struct MonoRegInfo { String bin_dir; }; -namespace MonoRegUtils -{ +namespace MonoRegUtils { MonoRegInfo find_mono(); String find_msbuild_tools_path(); diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp index 411e5f08f0..2493de5ccc 100644 --- a/modules/mono/utils/path_utils.cpp +++ b/modules/mono/utils/path_utils.cpp @@ -27,8 +27,7 @@ #define ENV_PATH_SEP ":" #endif // WINDOWS_ENABLED -namespace path -{ +namespace path { String find_executable(const String& p_name) { #ifdef WINDOWS_ENABLED diff --git a/modules/mono/utils/path_utils.h b/modules/mono/utils/path_utils.h index 544f24f17f..483a195aff 100644 --- a/modules/mono/utils/path_utils.h +++ b/modules/mono/utils/path_utils.h @@ -10,8 +10,7 @@ #include "core/string_builder.h" #include "core/ustring.h" -namespace path -{ +namespace path { String join(const String& p_a, const String& p_b); String join(const String& p_a, const String& p_b, const String& p_c); diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp index 754ff5d159..efcf304051 100644 --- a/modules/mono/utils/string_utils.cpp +++ b/modules/mono/utils/string_utils.cpp @@ -11,8 +11,7 @@ #include #include -namespace -{ +namespace { int sfind(const String& p_text, int p_from) { if (p_from < 0) { diff --git a/platform/uwp/app.h b/platform/uwp/app.h index 905ca420ae..0bdbd36874 100644 --- a/platform/uwp/app.h +++ b/platform/uwp/app.h @@ -13,8 +13,7 @@ #include "GLES2/gl2.h" #include "uwp_os.h" -namespace RebelUWP -{ +namespace RebelUWP { ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView { public: App(); diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 8b3f193afd..5f1fac7ca0 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -869,8 +869,7 @@ void SurfaceTool::append_from( } // mikktspace callbacks -namespace -{ +namespace { struct TangentGenerationContextUserData { Vector::Element*> vertices; Vector::Element*> indices; diff --git a/servers/visual/portals/portal_types.h b/servers/visual/portals/portal_types.h index 5a0705029d..cb4638d573 100644 --- a/servers/visual/portals/portal_types.h +++ b/servers/visual/portals/portal_types.h @@ -425,8 +425,7 @@ struct VSOccluder { LocalVector list_ids; }; -namespace Occlusion -{ +namespace Occlusion { struct Sphere { Vector3 pos; real_t radius;