Browse Source

Fix msvc warnings in mono module

- `modules\mono\csharp_script.cpp(576): warning C4099: 'CSharpScriptDepSort': type name first seen using 'class' now seen using 'struct'`
- `modules\mono\signal_awaiter_utils.cpp(144): warning C4003: not enough actual parameters for macro 'ERR_FAIL_V'`
- `modules\mono\editor\net_solution.cpp(101): warning C4129: '%': unrecognized character escape sequence`
- (several) `modules\mono\glue\cs_compressed.gen.h(222): warning C4129: 'E': unrecognized character escape sequence`
Ignacio Etcheverry 6 years ago
parent
commit
c6e2873605

+ 1 - 1
modules/mono/SCsub

@@ -44,7 +44,7 @@ def make_cs_files_header(src, dst, version_dst):
                         if i > 0:
                         if i > 0:
                             header.write(', ')
                             header.write(', ')
                         header.write(byte_to_str(buf[buf_idx]))
                         header.write(byte_to_str(buf[buf_idx]))
-                    inserted_files += '\tr_files.insert("' + filepath_src_rel + '", ' \
+                    inserted_files += '\tr_files.insert("' + filepath_src_rel.replace('\\', '\\\\') + '", ' \
                                         'CompressedFile(_cs_' + name + '_compressed_size, ' \
                                         'CompressedFile(_cs_' + name + '_compressed_size, ' \
                                         '_cs_' + name + '_uncompressed_size, ' \
                                         '_cs_' + name + '_uncompressed_size, ' \
                                         '_cs_' + name + '_compressed));\n'
                                         '_cs_' + name + '_compressed));\n'

+ 1 - 1
modules/mono/csharp_script.h

@@ -67,7 +67,7 @@ class CSharpScript : public Script {
 
 
 	friend class CSharpInstance;
 	friend class CSharpInstance;
 	friend class CSharpLanguage;
 	friend class CSharpLanguage;
-	friend class CSharpScriptDepSort;
+	friend struct CSharpScriptDepSort;
 
 
 	bool tool;
 	bool tool;
 	bool valid;
 	bool valid;

+ 1 - 1
modules/mono/editor/net_solution.cpp

@@ -52,7 +52,7 @@
 
 
 #define PROJECT_DECLARATION "Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"%0\", \"%1\", \"{%2}\"\nEndProject"
 #define PROJECT_DECLARATION "Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"%0\", \"%1\", \"{%2}\"\nEndProject"
 
 
-#define SOLUTION_PLATFORMS_CONFIG "\t\%0|Any CPU = %0|Any CPU"
+#define SOLUTION_PLATFORMS_CONFIG "\t%0|Any CPU = %0|Any CPU"
 
 
 #define PROJECT_PLATFORMS_CONFIG                   \
 #define PROJECT_PLATFORMS_CONFIG                   \
 	"\t\t{%0}.%1|Any CPU.ActiveCfg = %1|Any CPU\n" \
 	"\t\t{%0}.%1|Any CPU.ActiveCfg = %1|Any CPU\n" \

+ 1 - 1
modules/mono/signal_awaiter_utils.cpp

@@ -141,7 +141,7 @@ SignalAwaiterHandle::~SignalAwaiterHandle() {
 
 
 			if (exc) {
 			if (exc) {
 				GDMonoUtils::set_pending_exception(exc);
 				GDMonoUtils::set_pending_exception(exc);
-				ERR_FAIL_V();
+				ERR_FAIL();
 			}
 			}
 		}
 		}
 	}
 	}