Code standardtization pass. Fixed a bunch of warnings.

This commit is contained in:
Antoine Pilote
2023-03-04 17:50:02 -05:00
parent dfd8c0c57d
commit 8be7695d1e
28 changed files with 133 additions and 106 deletions

View File

@@ -82,9 +82,7 @@ namespace Nuake {
path += ".wren";
std::string str = FileSystem::ReadFile(path, true);
char* c = strcpy(new char[str.length() + 1], str.c_str());
result.source = c;
result.source = str.c_str();
return result;
}
@@ -173,7 +171,7 @@ namespace Nuake {
wrenFreeVM(m_WrenVM);
}
WrenForeignMethodFn ScriptingEngine::bindForeignMethod(WrenVM* vm, const char* module, const char* className, bool isStatic, const char* signature)
WrenForeignMethodFn ScriptingEngine::bindForeignMethod(WrenVM* vm, const char* modul, const char* className, bool isStatic, const char* signature)
{
if (Modules.find(className) != Modules.end())
{
@@ -181,6 +179,8 @@ namespace Nuake {
void* ptr = mod->GetMethodPointer(signature);
return (WrenForeignMethodFn)ptr;
}
return nullptr;
}
WrenVM* ScriptingEngine::GetWrenVM()