C++: Include primitive types in reserved name list
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Il2CppInspector.Cpp
|
||||
{
|
||||
@@ -31,6 +30,14 @@ namespace Il2CppInspector.Cpp
|
||||
renameCount[name] = 0;
|
||||
}
|
||||
|
||||
// Try to mark a name as reserved without assigning an object to it (e.g. for keywords and built-in names)
|
||||
public bool TryReserveName(string name) {
|
||||
if (renameCount.ContainsKey(name))
|
||||
return false;
|
||||
renameCount[name] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Create a Namer object which will give names to objects of type T which are unique within this namespace
|
||||
public Namer<T> MakeNamer<T>(Namer<T>.KeyFunc keyFunc) {
|
||||
return new Namer<T>(this, keyFunc);
|
||||
|
||||
Reference in New Issue
Block a user