Solving a few warnings

This commit is contained in:
Nigel Barink 2022-11-05 17:17:08 +01:00
parent 7343300dcb
commit 02e14aa8fa
7 changed files with 19 additions and 11 deletions

View File

@ -38,6 +38,6 @@ libdirs {
}
files {
"./src/*.h",
"./src/*.cpp"
"./src/**.h",
"./src/**.cpp"
}

View File

@ -57,6 +57,7 @@ namespace YAML {
return false;
rhs.setName(node["Project"].as<std::string>());
rhs.setProjectDirectory(node["Directory"].as<std::string>());
return true;
}

View File

@ -47,17 +47,17 @@ void Inspector(entt::entity ent , Scene& scene) {
ImGui::NewLine();
auto component = entity.GetComponent<IdentifierComponent>();
char* buf = new char(component.name.length());
char* buf = new char(component.name.size());
strcpy(buf, component.name.c_str());
ImGui::InputText("Name:",buf , IM_ARRAYSIZE(buf), ImGuiInputTextFlags_ReadOnly);
ImGui::InputText("Name:",buf , sizeof(buf), ImGuiInputTextFlags_ReadOnly);
if (entity.HasComponent<TransformComponent>()) {
auto& transform = entity.GetComponent<TransformComponent>();
if (ImGui::CollapsingHeader("Transform", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::DragFloat3("Position", glm::value_ptr(transform.Position), 0.01);
ImGui::DragFloat3("Rotation", glm::value_ptr(transform.Rotation), 0.01);
ImGui::DragFloat3("Scale", glm::value_ptr(transform.Scale), 0.01, 0);
ImGui::DragFloat3("Position", glm::value_ptr(transform.Position), 0.01f);
ImGui::DragFloat3("Rotation", glm::value_ptr(transform.Rotation), 0.01f);
ImGui::DragFloat3("Scale", glm::value_ptr(transform.Scale), 0.01f, 0.0f);
}
}

View File

@ -2,6 +2,11 @@ project "YoggieEngine"
kind "StaticLib"
buildmessage "Building Yoggie Engine"
disablewarnings{
"4099" -- Ignore the missing debug signals for GLFW warning
}
includedirs {
"../libs/spdlog/include",

View File

@ -7,9 +7,6 @@
#include "graphics/Renderable.h"
#include "Graphics/Renderer.h"
#include "Graphics/Primitives/Material.h"
#include "spdlog/spdlog.h"
#include "Input/InputManager.h"
#include "Graphics/Renderer.h"
#include "GUI/GUIManager.h"

View File

@ -1,4 +1,4 @@
#include "RenderSurface.h";
#include "RenderSurface.h"
namespace YoggieEngine {
RenderSurface::RenderSurface() {
shader = new Shader("build/SandboxAppliction/Debug/renderSuface.vs", "build/SandboxApplication/Debug/renderSurface.fs");

View File

@ -13,6 +13,11 @@ workspace "Yoggie GameEngine"
startproject("Editor")
defines{
" _CRT_SECURE_NO_WARNINGS",
}
filter "configurations:Debug"
defines {"DEBUG"}
symbols "On"