Changed String extensions to retunr char size as a 1 byte (cpp size) instead of 2 bytes (C# size)
This commit is contained in:
@@ -30,7 +30,7 @@ namespace CodeGenerator {
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static int ParseFSize(this string str) {
|
public static int ParseFSize(this string str) {
|
||||||
return str switch {
|
return str switch {
|
||||||
"char" => sizeof(char),
|
"char" => sizeof(sbyte),
|
||||||
"short" => sizeof(short),
|
"short" => sizeof(short),
|
||||||
"int" => sizeof(int),
|
"int" => sizeof(int),
|
||||||
"float" => sizeof(float),
|
"float" => sizeof(float),
|
||||||
|
|||||||
Reference in New Issue
Block a user