summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/SCsub21
-rw-r--r--modules/mono/csharp_script.cpp4
-rw-r--r--modules/mono/editor/csharp_project.cpp2
-rw-r--r--modules/mono/editor/csharp_project.h2
-rw-r--r--modules/mono/glue/cs_files/Error.cs3
-rw-r--r--modules/mono/godotsharp_dirs.cpp2
-rw-r--r--modules/mono/godotsharp_dirs.h2
-rw-r--r--modules/mono/mono_gc_handle.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.cpp2
-rw-r--r--modules/mono/signal_awaiter_utils.cpp6
-rw-r--r--modules/mono/utils/mono_reg_utils.h2
-rw-r--r--modules/mono/utils/string_utils.cpp2
12 files changed, 27 insertions, 25 deletions
diff --git a/modules/mono/SCsub b/modules/mono/SCsub
index 18a20ecac4..320bbe7090 100644
--- a/modules/mono/SCsub
+++ b/modules/mono/SCsub
@@ -1,6 +1,9 @@
#!/usr/bin/env python
Import('env')
+Import('env_modules')
+
+env_mono = env_modules.Clone()
from compat import byte_to_str
@@ -43,12 +46,12 @@ def make_cs_files_header(src, dst):
header.write('#endif // _CS_FILES_DATA_H')
-env.add_source_files(env.modules_sources, '*.cpp')
-env.add_source_files(env.modules_sources, 'mono_gd/*.cpp')
-env.add_source_files(env.modules_sources, 'utils/*.cpp')
+env_mono.add_source_files(env.modules_sources, '*.cpp')
+env_mono.add_source_files(env.modules_sources, 'mono_gd/*.cpp')
+env_mono.add_source_files(env.modules_sources, 'utils/*.cpp')
if env['tools']:
- env.add_source_files(env.modules_sources, 'editor/*.cpp')
+ env_mono.add_source_files(env.modules_sources, 'editor/*.cpp')
make_cs_files_header('glue/cs_files', 'glue/cs_compressed.gen.h')
vars = Variables()
@@ -58,12 +61,12 @@ vars.Update(env)
# Glue sources
if env['mono_glue']:
- env.add_source_files(env.modules_sources, 'glue/*.cpp')
+ env_mono.add_source_files(env.modules_sources, 'glue/*.cpp')
else:
- env.Append(CPPDEFINES=['MONO_GLUE_DISABLED'])
+ env_mono.Append(CPPDEFINES=['MONO_GLUE_DISABLED'])
if ARGUMENTS.get('yolo_copy', False):
- env.Append(CPPDEFINES=['YOLO_COPY'])
+ env_mono.Append(CPPDEFINES=['YOLO_COPY'])
# Build GodotSharpTools solution
@@ -201,8 +204,8 @@ def mono_build_solution(source, target, env):
mono_sln_builder = Builder(action = mono_build_solution)
-env.Append(BUILDERS={'MonoBuildSolution': mono_sln_builder})
-env.MonoBuildSolution(
+env_mono.Append(BUILDERS={'MonoBuildSolution': mono_sln_builder})
+env_mono.MonoBuildSolution(
os.path.join(Dir('#bin').abspath, 'GodotSharpTools.dll'),
'editor/GodotSharpTools/GodotSharpTools.sln'
)
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 6fbc309fa3..af5a0334c3 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1885,8 +1885,8 @@ StringName CSharpScript::get_script_name() const {
return name;
}
-CSharpScript::CSharpScript()
- : script_list(this) {
+CSharpScript::CSharpScript() :
+ script_list(this) {
_clear();
diff --git a/modules/mono/editor/csharp_project.cpp b/modules/mono/editor/csharp_project.cpp
index bde5f0fd0b..9a1efb4423 100644
--- a/modules/mono/editor/csharp_project.cpp
+++ b/modules/mono/editor/csharp_project.cpp
@@ -117,4 +117,4 @@ void add_item(const String &p_project_path, const String &p_item_type, const Str
ERR_FAIL();
}
}
-} // CSharpProject
+} // namespace CSharpProject
diff --git a/modules/mono/editor/csharp_project.h b/modules/mono/editor/csharp_project.h
index 4832d2251e..44e8325a59 100644
--- a/modules/mono/editor/csharp_project.h
+++ b/modules/mono/editor/csharp_project.h
@@ -39,6 +39,6 @@ String generate_editor_api_project(const String &p_dir, const String &p_core_dll
String generate_game_project(const String &p_dir, const String &p_name, const Vector<String> &p_files = Vector<String>());
void add_item(const String &p_project_path, const String &p_item_type, const String &p_include);
-}
+} // namespace CSharpProject
#endif // CSHARP_PROJECT_H
diff --git a/modules/mono/glue/cs_files/Error.cs b/modules/mono/glue/cs_files/Error.cs
index 3f4a92603d..dee4b88f74 100644
--- a/modules/mono/glue/cs_files/Error.cs
+++ b/modules/mono/glue/cs_files/Error.cs
@@ -42,7 +42,6 @@ namespace Godot
ERR_CYCLIC_LINK = 40,
ERR_BUSY = 44,
ERR_HELP = 46,
- ERR_BUG = 47,
- ERR_WTF = 49
+ ERR_BUG = 47
}
}
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp
index a0c2508b0d..0f6245a37c 100644
--- a/modules/mono/godotsharp_dirs.cpp
+++ b/modules/mono/godotsharp_dirs.cpp
@@ -192,4 +192,4 @@ String get_project_csproj_path() {
return _GodotSharpDirs::get_singleton().csproj_filepath;
}
#endif
-}
+} // namespace GodotSharpDirs
diff --git a/modules/mono/godotsharp_dirs.h b/modules/mono/godotsharp_dirs.h
index ba2c065210..914df40629 100644
--- a/modules/mono/godotsharp_dirs.h
+++ b/modules/mono/godotsharp_dirs.h
@@ -53,6 +53,6 @@ String get_custom_project_settings_dir();
String get_project_sln_path();
String get_project_csproj_path();
-}
+} // namespace GodotSharpDirs
#endif // GODOTSHARP_DIRS_H
diff --git a/modules/mono/mono_gc_handle.cpp b/modules/mono/mono_gc_handle.cpp
index e10e06df0e..121392b3f8 100644
--- a/modules/mono/mono_gc_handle.cpp
+++ b/modules/mono/mono_gc_handle.cpp
@@ -36,7 +36,7 @@ uint32_t MonoGCHandle::make_strong_handle(MonoObject *p_object) {
return mono_gchandle_new(
p_object,
false /* do not pin the object */
- );
+ );
}
uint32_t MonoGCHandle::make_weak_handle(MonoObject *p_object) {
@@ -44,7 +44,7 @@ uint32_t MonoGCHandle::make_weak_handle(MonoObject *p_object) {
return mono_gchandle_new_weakref(
p_object,
true /* track_resurrection: allows us to invoke _notification(NOTIFICATION_PREDELETE) while disposing */
- );
+ );
}
Ref<MonoGCHandle> MonoGCHandle::create_strong(MonoObject *p_object) {
diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp
index cfe2148b80..56e8a01567 100644
--- a/modules/mono/mono_gd/gd_mono_internals.cpp
+++ b/modules/mono/mono_gd/gd_mono_internals.cpp
@@ -63,4 +63,4 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
return;
}
-}
+} // namespace GDMonoInternals
diff --git a/modules/mono/signal_awaiter_utils.cpp b/modules/mono/signal_awaiter_utils.cpp
index 7e99df29a1..47cc11cc0a 100644
--- a/modules/mono/signal_awaiter_utils.cpp
+++ b/modules/mono/signal_awaiter_utils.cpp
@@ -62,7 +62,7 @@ Error connect_signal_awaiter(Object *p_source, const String &p_signal, Object *p
return err;
}
-}
+} // namespace SignalAwaiterUtils
Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
@@ -116,8 +116,8 @@ void SignalAwaiterHandle::_bind_methods() {
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "_signal_callback", &SignalAwaiterHandle::_signal_callback, MethodInfo("_signal_callback"));
}
-SignalAwaiterHandle::SignalAwaiterHandle(uint32_t p_managed_handle)
- : MonoGCHandle(p_managed_handle) {
+SignalAwaiterHandle::SignalAwaiterHandle(uint32_t p_managed_handle) :
+ MonoGCHandle(p_managed_handle) {
#ifdef DEBUG_ENABLED
conn_target_id = 0;
diff --git a/modules/mono/utils/mono_reg_utils.h b/modules/mono/utils/mono_reg_utils.h
index 4cc4965acb..599828aa80 100644
--- a/modules/mono/utils/mono_reg_utils.h
+++ b/modules/mono/utils/mono_reg_utils.h
@@ -47,7 +47,7 @@ namespace MonoRegUtils {
MonoRegInfo find_mono();
String find_msbuild_tools_path();
-} // MonoRegUtils
+} // namespace MonoRegUtils
#endif // WINDOWS_ENABLED
diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp
index f26663ea11..8f817771ac 100644
--- a/modules/mono/utils/string_utils.cpp
+++ b/modules/mono/utils/string_utils.cpp
@@ -78,7 +78,7 @@ int sfind(const String &p_text, int p_from) {
return -1;
}
-}
+} // namespace
String sformat(const String &p_text, const Variant &p1, const Variant &p2, const Variant &p3, const Variant &p4, const Variant &p5) {
if (p_text.length() < 2)