forgottenserver
forgottenserver copied to clipboard
Change return type of getScriptBaseName to string_view
getScriptBaseName functions exist in event types (Actions, Weapons, etc) and return a constant string referring to the name of the class. It is possible to, instead of returning std::string, return std::string_view which is more lightweight and avoids copying data on every call (a string has to be created, where a string_view will just be a pointer to static data).
Tip: just search for getScriptBaseName, it's very likely that a search and replace is enough. Optionally, move all definitions to cpp files.