Make classRegistry use hashes instead of strings as keys for faster lookup

Up version to 0.7.16
This commit is contained in:
Evgeny Zuev 2018-08-28 14:05:33 +07:00 • committed by Ruslan Mustakov
commit ceaf66a34c
9 changed files with 101 additions and 23 deletions

View file

@ -22,6 +22,12 @@ proc `&`*(self, b: GodotString): GodotString {.inline.} =
proc deinit*(self: var GodotString) {.inline.} =
getGDNativeAPI().stringDestroy(self)
proc len*(self: GodotString): cint {.inline.} =
getGDNativeAPI().stringLength(self)
proc dataPtr*(self: GodotString): ptr cwchar_t {.inline.} =
getGDNativeAPI().stringWideStr(self)
proc `$`*(self: GodotString): string =
## Converts the ``GodotString`` into Nim string
var charStr = getGDNativeAPI().stringUtf8(self)