瀏覽代碼

Fixed warn/obsolete

Brian Fiete 4 年之前
父節點
當前提交
ae0f3c5ebb
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 1 1
      BeefLibs/corlib/src/System.bf
  2. 4 4
      IDEHelper/Compiler/BfModule.cpp

+ 1 - 1
BeefLibs/corlib/src/System.bf

@@ -153,7 +153,7 @@ static
 	}
 	}
 
 
 	[NoShow]
 	[NoShow]
-	[Warn("This mixin has been replaced by ClearAndDeleteItems")]
+	[Obsolete("This mixin has been replaced by ClearAndDeleteItems", false)]
 	public static mixin DeleteAndClearItems(var container)
 	public static mixin DeleteAndClearItems(var container)
 	{
 	{
 		for (var value in container)
 		for (var value in container)

+ 4 - 4
IDEHelper/Compiler/BfModule.cpp

@@ -3093,9 +3093,9 @@ void BfModule::CheckErrorAttributes(BfTypeInstance* typeInstance, BfMethodInstan
 	{
 	{
 		String err;
 		String err;
 		if (methodInstance != NULL)
 		if (methodInstance != NULL)
-			StrFormat("Method error: '", MethodToString(methodInstance).c_str());
+			err += StrFormat("Method error: '", MethodToString(methodInstance).c_str());
 		else
 		else
-			StrFormat("Type error: '", TypeToString(typeInstance, BfTypeNameFlag_UseUnspecializedGenericParamNames).c_str());
+			err += StrFormat("Type error: '", TypeToString(typeInstance, BfTypeNameFlag_UseUnspecializedGenericParamNames).c_str());
 		String* str = GetStringPoolString(customAttribute->mCtorArgs[0], constHolder);
 		String* str = GetStringPoolString(customAttribute->mCtorArgs[0], constHolder);
 		if (str != NULL)
 		if (str != NULL)
 			err += *str;
 			err += *str;
@@ -3109,9 +3109,9 @@ void BfModule::CheckErrorAttributes(BfTypeInstance* typeInstance, BfMethodInstan
 	{
 	{
 		String err;
 		String err;
 		if (methodInstance != NULL)
 		if (methodInstance != NULL)
-			StrFormat("Method warning: '", MethodToString(methodInstance).c_str());
+			err += StrFormat("Method warning: '", MethodToString(methodInstance).c_str());
 		else
 		else
-			StrFormat("Type warning: '", TypeToString(typeInstance, BfTypeNameFlag_UseUnspecializedGenericParamNames).c_str());
+			err += StrFormat("Type warning: '", TypeToString(typeInstance, BfTypeNameFlag_UseUnspecializedGenericParamNames).c_str());
 		String* str = GetStringPoolString(customAttribute->mCtorArgs[0], constHolder);
 		String* str = GetStringPoolString(customAttribute->mCtorArgs[0], constHolder);
 		if (str != NULL)
 		if (str != NULL)
 			err += *str;
 			err += *str;