diff --git a/Nuake/src/Rendering/Mesh/Mesh.cpp b/Nuake/src/Rendering/Mesh/Mesh.cpp index e162ae82..6472bb53 100644 --- a/Nuake/src/Rendering/Mesh/Mesh.cpp +++ b/Nuake/src/Rendering/Mesh/Mesh.cpp @@ -84,7 +84,7 @@ namespace Nuake { m_VertexArray = CreateScope(); m_VertexArray->Bind(); - m_VertexBuffer = CreateScope(m_Vertices.data(), m_Vertices.size() * sizeof(Vertex)); + m_VertexBuffer = CreateScope(m_Vertices.data(), static_castt(m_Vertices.size() * sizeof(Vertex))); m_ElementBuffer = CreateScope(m_Indices.data(), m_Indices.size() * sizeof(unsigned int), RendererEnum::ELEMENT_ARRAY_BUFFER); VertexBufferLayout bufferLayout = VertexBufferLayout(); @@ -191,7 +191,7 @@ namespace Nuake std::vector vertices; - std::async(std::launch::async, [&]() + auto asyncResult = std::async(std::launch::async, [&]() { for (auto& v : j["Vertices"]) { @@ -199,7 +199,7 @@ namespace Nuake try { DESERIALIZE_VEC2(v["UV"], vertex.uv) } - catch (std::exception& e) { + catch (std::exception& /*e*/) { vertex.uv = { 0.0, 0.0 }; } DESERIALIZE_VEC3(v["Position"], vertex.position) diff --git a/Nuake/src/Rendering/Textures/Texture.cpp b/Nuake/src/Rendering/Textures/Texture.cpp index df337820..5bd1fc0b 100644 --- a/Nuake/src/Rendering/Textures/Texture.cpp +++ b/Nuake/src/Rendering/Textures/Texture.cpp @@ -148,5 +148,7 @@ namespace Nuake { if (j.contains("Path")) return false; + + return true; } } diff --git a/Nuake/src/Resource/ModelLoader.cpp b/Nuake/src/Resource/ModelLoader.cpp index e2662343..eaa31159 100644 --- a/Nuake/src/Resource/ModelLoader.cpp +++ b/Nuake/src/Resource/ModelLoader.cpp @@ -95,8 +95,8 @@ namespace Nuake aiAnimation* aiAnim = scene->mAnimations[i]; const std::string animationName = aiAnim->mName.data; - const float animationDuration = aiAnim->mDuration; - const float animationTicksPerSecond = aiAnim->mTicksPerSecond; + const float animationDuration = static_cast(aiAnim->mDuration); + const float animationTicksPerSecond = static_cast(aiAnim->mTicksPerSecond); auto animation = CreateRef(animationName, animationDuration, animationTicksPerSecond); // Here we iterate over every channel(each channel represents a bone) and fill the SkeletalAnimation @@ -114,7 +114,7 @@ namespace Nuake for (uint32_t p = 0; p < animChannel->mNumPositionKeys; p++) { aiVectorKey positionKey = animChannel->mPositionKeys[p]; - const float keyTime = positionKey.mTime; + const float keyTime = static_cast(positionKey.mTime); const aiVector3D assimpKeyValue = positionKey.mValue; const Vector3 keyValue = Vector3(assimpKeyValue.x, assimpKeyValue.y, assimpKeyValue.z); @@ -125,7 +125,7 @@ namespace Nuake for (uint32_t r = 0; r < animChannel->mNumRotationKeys; r++) { aiQuatKey rotationKey = animChannel->mRotationKeys[r]; - const float keyTime = rotationKey.mTime; + const float keyTime = static_cast(rotationKey.mTime); const aiQuaterniont assimpKeyValue = rotationKey.mValue; const Quat keyValue = Quat(assimpKeyValue.w, assimpKeyValue.x, assimpKeyValue.y, assimpKeyValue.z); @@ -136,7 +136,7 @@ namespace Nuake for (uint32_t s = 0; s < animChannel->mNumScalingKeys; s++) { aiVectorKey scaleKey = animChannel->mScalingKeys[s]; - const float keyTime = scaleKey.mTime; + const float keyTime = static_cast(scaleKey.mTime); const aiVector3D assimpKeyValue = scaleKey.mValue; const Vector3 keyValue = Vector3(assimpKeyValue.x, assimpKeyValue.y, assimpKeyValue.z); @@ -528,12 +528,12 @@ namespace Nuake if (aitexture->mHeight == 0) { // We are using a compression like jpeg, where width is the size of the buffer in bytes. - nuakeTexture = CreateRef((unsigned char*)aitexture->pcData, aitexture->mWidth); + nuakeTexture = CreateRef((unsigned char*)aitexture->pcData, static_cast(aitexture->mWidth)); } else { Vector2 textureSize = Vector2(aitexture->mWidth, aitexture->mHeight); - nuakeTexture = CreateRef((unsigned char*)aitexture->pcData, textureSize.x); + nuakeTexture = CreateRef((unsigned char*)aitexture->pcData, static_cast(textureSize.x)); } return nuakeTexture; diff --git a/Nuake/src/Resource/SkinnedModel.cpp b/Nuake/src/Resource/SkinnedModel.cpp index 39f4187a..61961500 100644 --- a/Nuake/src/Resource/SkinnedModel.cpp +++ b/Nuake/src/Resource/SkinnedModel.cpp @@ -105,7 +105,7 @@ namespace Nuake m_Meshes = otherModel->GetMeshes(); m_Animations = otherModel->GetAnimations(); m_SkeletonRoot = otherModel->GetSkeletonRootNode(); - m_NumAnimation = m_Animations.size(); + m_NumAnimation = static_cast(m_Animations.size()); m_CurrentAnimation = 0; if (j.contains("SkeletonNode"))