Skip to content

Commit

Permalink
Resolved compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cofenberg committed Jun 10, 2019
1 parent 1ef7328 commit ef07b2c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10980,7 +10980,7 @@ namespace Direct3D10Renderer
return numberOfShaderLanguages;
}

const char* Direct3D10Renderer::getShaderLanguageName(uint32_t index) const
const char* Direct3D10Renderer::getShaderLanguageName([[maybe_unused]] uint32_t index) const
{
RENDERER_ASSERT(mContext, index < getNumberOfShaderLanguages(), "Direct3D 10: Shader language index is out-of-bounds")
return ::detail::HLSL_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13979,7 +13979,7 @@ namespace Direct3D11Renderer
return numberOfShaderLanguages;
}

const char* Direct3D11Renderer::getShaderLanguageName(uint32_t index) const
const char* Direct3D11Renderer::getShaderLanguageName([[maybe_unused]] uint32_t index) const
{
RENDERER_ASSERT(mContext, index < getNumberOfShaderLanguages(), "Direct3D 11: Shader language index is out-of-bounds")
return ::detail::HLSL_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12112,7 +12112,7 @@ namespace Direct3D12Renderer
return numberOfShaderLanguages;
}

const char* Direct3D12Renderer::getShaderLanguageName(uint32_t index) const
const char* Direct3D12Renderer::getShaderLanguageName([[maybe_unused]] uint32_t index) const
{
RENDERER_ASSERT(mContext, index < getNumberOfShaderLanguages(), "Direct3D 12: Shader language index is out-of-bounds")
return ::detail::HLSL_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8715,7 +8715,7 @@ namespace Direct3D9Renderer
return numberOfShaderLanguages;
}

const char* Direct3D9Renderer::getShaderLanguageName(uint32_t index) const
const char* Direct3D9Renderer::getShaderLanguageName([[maybe_unused]] uint32_t index) const
{
RENDERER_ASSERT(mContext, index < getNumberOfShaderLanguages(), "Direct3D 9: Shader language index is out-of-bounds")
return ::detail::HLSL_NAME;
Expand Down
2 changes: 1 addition & 1 deletion Source/Renderer/Private/NullRenderer/NullRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3907,7 +3907,7 @@ namespace NullRenderer
return 1;
}

const char* NullRenderer::getShaderLanguageName(uint32_t index) const
const char* NullRenderer::getShaderLanguageName([[maybe_unused]] uint32_t index) const
{
RENDERER_ASSERT(mContext, index < getNumberOfShaderLanguages(), "Null: Shader language index is out-of-bounds")
return ::detail::NULL_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10359,7 +10359,7 @@ namespace OpenGLES3Renderer
return 1;
}

const char* OpenGLES3Renderer::getShaderLanguageName(uint32_t index) const
const char* OpenGLES3Renderer::getShaderLanguageName([[maybe_unused]] uint32_t index) const
{
RENDERER_ASSERT(mContext, index < getNumberOfShaderLanguages(), "OpenGL ES 3: Shader language index is out-of-bounds")
return ::detail::GLSLES_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ PRAGMA_WARNING_PUSH
#include <rapidjson/document.h>
PRAGMA_WARNING_POP

#include <atomic>
// Disable warnings in external headers, we can't fix them
PRAGMA_WARNING_PUSH
PRAGMA_WARNING_DISABLE_MSVC(4625) // warning C4625: 'std::atomic_flag': copy constructor was implicitly defined as deleted
PRAGMA_WARNING_DISABLE_MSVC(4626) // warning C4626: 'std::atomic_flag': assignment operator was implicitly defined as deleted
PRAGMA_WARNING_DISABLE_MSVC(5026) // warning C5026: 'std::atomic_flag': move constructor was implicitly defined as deleted
PRAGMA_WARNING_DISABLE_MSVC(5027) // warning C5027: 'std::atomic_flag': move assignment operator was implicitly defined as deleted
#include <atomic>
PRAGMA_WARNING_POP


//[-------------------------------------------------------]
Expand Down
2 changes: 2 additions & 0 deletions Source/RendererToolkit/Private/Project/ProjectImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ PRAGMA_WARNING_PUSH
PRAGMA_WARNING_DISABLE_MSVC(4625) // warning C4625: 'std::_Ptr_base<_Ty>': copy constructor was implicitly defined as deleted
PRAGMA_WARNING_DISABLE_MSVC(4626) // warning C4626: 'std::_Ptr_base<_Ty>': assignment operator was implicitly defined as deleted
PRAGMA_WARNING_DISABLE_MSVC(4668) // warning C4668: '_M_HYBRID_X86_ARM64' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
PRAGMA_WARNING_DISABLE_MSVC(5026) // warning C5026: 'std::atomic_flag': move constructor was implicitly defined as deleted
PRAGMA_WARNING_DISABLE_MSVC(5027) // warning C5027: 'std::atomic_flag': move assignment operator was implicitly defined as deleted
PRAGMA_WARNING_DISABLE_MSVC(5039) // warning C5039: '_Thrd_start': pointer or reference to potentially throwing function passed to extern C function under -EHc. Undefined behavior may occur if this function throws an exception.
#include <thread>
#include <atomic> // For "std::atomic<>"
Expand Down

0 comments on commit ef07b2c

Please sign in to comment.