Fixed building error

This commit is contained in:
Antoine Pilote
2023-10-15 16:31:09 -04:00
parent 9d87236662
commit 8d04a81846
4 changed files with 15 additions and 3 deletions

View File

@@ -60,9 +60,9 @@ namespace Nuake {
auto resultFindIt = std::find_if(
m_ApplicationModules.begin(),
m_ApplicationModules.end(),
[](IApplicationModule& module)
[](IApplicationModule& appModule)
{
return dynamic_cast<T*>(&module) != nullptr;
return dynamic_cast<T*>(&appModule) != nullptr;
}
);

View File

@@ -53,6 +53,17 @@ namespace Nuake {
#endif
}
void OS::ExecuteCommand(const std::string& command)
{
#ifdef NK_WIN
ShellExecuteA(nullptr, command.c_str(), nullptr, nullptr, nullptr, SW_SHOWDEFAULT);
#endif
#ifdef NK_LINUX
system(command.c_str());
#endif
}
int OS::RenameFile(const Ref<File>& file, const std::string& newName)
{
std::string extension = !String::EndsWith(newName, file->GetExtension().c_str()) ? file->GetExtension() : "";

View File

@@ -12,6 +12,7 @@ namespace Nuake
static std::string GetFromClipboard();
static int GetTime();
static void OpenIn(const std::string& filePath);
static void ExecuteCommand(const std::string& command);
static int RenameFile(const Ref<File>& file, const std::string& newName);
static int RenameDirectory(const Ref<Directory>& dir, const std::string& newName);
static void ShowInFileExplorer(const std::string& filePath);

View File

@@ -1,7 +1,7 @@
#include "PhysicsShapes.h"
#include "Rigibody.h"
#include "src/Core/Core.h"
#include "src/Core/Physics/PhysicsManager.h"
#include "src/Physics/PhysicsManager.h"
#include <glm/trigonometric.hpp>
#include <src/Scene/Entities/Entity.h>