未验证 提交 f0fbcc28 编写于 作者: M Michał Petryka 提交者: GitHub

Fix ThunkGenerator (#84390)

* Fix ThunkGenerator

Fixes:
```
 error CA1859: Change type of parameter 'tr' from 'System.IO.TextReader' to 'System.IO.StreamReader' for improved performance
 error CA1859: Change return type of method 'ParseInput' from 'System.Collections.Generic.IEnumerable<Thunkerator.FunctionDecl>' to 'System.Collections.ObjectModel.ReadOnlyCollection<Thunkerator.FunctionDecl>' for improved performance
```

* Fix typo
上级 f5895b30
......@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
......@@ -174,7 +175,7 @@ private enum ParseMode
IFDEFING
}
private static IEnumerable<FunctionDecl> ParseInput(TextReader tr)
private static ReadOnlyCollection<FunctionDecl> ParseInput(StreamReader tr)
{
Dictionary<string, TypeReplacement> ThunkReturnTypes = new Dictionary<string, TypeReplacement>();
Dictionary<string, TypeReplacement> ThunkTypes = new Dictionary<string, TypeReplacement>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册