Output: Annotate float values with 'f' suffix (CS0664)
This commit is contained in:
@@ -66,6 +66,8 @@ namespace Il2CppInspector.Reflection
|
|||||||
public static string ToCSharpValue(this object value) {
|
public static string ToCSharpValue(this object value) {
|
||||||
if (value is bool)
|
if (value is bool)
|
||||||
return (bool) value ? "true" : "false";
|
return (bool) value ? "true" : "false";
|
||||||
|
if (value is float)
|
||||||
|
return value + "f";
|
||||||
if (value is string str) {
|
if (value is string str) {
|
||||||
// Replace standard escape characters
|
// Replace standard escape characters
|
||||||
var s = new StringBuilder();
|
var s = new StringBuilder();
|
||||||
|
|||||||
Reference in New Issue
Block a user