- Joined
- Jun 12, 2010
- Messages
- 413
Hmmm, so this works like GMUI but also applies an index counter? I never applied a debug/index counter to GMUI because I wanted it to be as optimized as possible, but it's certainly useful to have these features. You also built it in a manner that is a lot safer, since you made checks for the validity of the parameters.
With this I think I can add a configuration for advanced users in my systems, so they can define which index generator system they want to use. I should also post GMUI on the spell section, since it has been in the pastebin since forever.
Anyways, this is something that's really useful, so obviously 5 stars.
EDIT: My only suggestion would be adding an in-lineable function that returns how many indexes exist for a given main key.
EDIT2: Since you are making functions that are safe, then maybe you can make it not inlineable and have it check if the mainKey is valid.
With this I think I can add a configuration for advanced users in my systems, so they can define which index generator system they want to use. I should also post GMUI on the spell section, since it has been in the pastebin since forever.
Anyways, this is something that's really useful, so obviously 5 stars.
EDIT: My only suggestion would be adding an in-lineable function that returns how many indexes exist for a given main key.
JASS:
function SizeOfKey takes integer mainKey returns integer
return LoadInteger(udg_Allocator_HASH, mainKey, -1)
endfunction
EDIT2: Since you are making functions that are safe, then maybe you can make it not inlineable and have it check if the mainKey is valid.
JASS:
function SizeOfKey takes integer mainKey returns integer
if HaveSavedInteger(udg_Allocator_Hash, mainKey, -1) then
return LoadInteger(udg_Allocator_HASH, mainKey, -1)
else
// ... Debug ...
return -1
endif
endfunction
Last edited: