summaryrefslogtreecommitdiffstats
path: root/Graphics
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-06 05:01:12 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-06 05:01:12 +0000
commit79bd7f22ccb98ddd9383c31154c2f697115e1088 (patch)
tree9e92194d601f48325701bf19e3fd60c68ff5217e /Graphics
parentMinor updates to CMake files (diff)
downloadDiligentCore-79bd7f22ccb98ddd9383c31154c2f697115e1088.tar.gz
DiligentCore-79bd7f22ccb98ddd9383c31154c2f697115e1088.zip
Fixed tolower()-related warnings
Diffstat (limited to 'Graphics')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp5
-rw-r--r--Graphics/HLSL2GLSLConverterLib/src/HLSL2GLSLConverterImpl.cpp13
2 files changed, 9 insertions, 9 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp
index 40d2074a..59d193c1 100644
--- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp
@@ -41,6 +41,7 @@
#include "PipelineStateGLImpl.h"
#include "ShaderResourceBindingGLImpl.h"
#include "EngineMemory.h"
+#include "StringTools.h"
namespace Diligent
{
@@ -66,8 +67,8 @@ RenderDeviceGLImpl :: RenderDeviceGLImpl(IReferenceCounters *pRefCounters, IMemo
QueryDeviceCaps();
std::basic_string<GLubyte> glstrVendor = glGetString( GL_VENDOR );
- std::string Vendor(glstrVendor.begin(), glstrVendor.end());
- transform(Vendor.begin(), Vendor.end(), Vendor.begin(), ::tolower);
+ std::string Vendor = StrToLower(std::string(glstrVendor.begin(), glstrVendor.end()));
+
if( Vendor.find( "intel" ) != std::string::npos )
m_GPUInfo.Vendor = GPU_VENDOR::INTEL;
else if( Vendor.find( "nvidia" ) != std::string::npos )
diff --git a/Graphics/HLSL2GLSLConverterLib/src/HLSL2GLSLConverterImpl.cpp b/Graphics/HLSL2GLSLConverterLib/src/HLSL2GLSLConverterImpl.cpp
index 644a43ac..4c358c7a 100644
--- a/Graphics/HLSL2GLSLConverterLib/src/HLSL2GLSLConverterImpl.cpp
+++ b/Graphics/HLSL2GLSLConverterLib/src/HLSL2GLSLConverterImpl.cpp
@@ -357,6 +357,7 @@
#include "ShaderBase.h"
#include "DataBlobImpl.h"
#include "StringDataBlobImpl.h"
+#include "StringTools.h"
namespace Diligent
{
@@ -1022,8 +1023,7 @@ void HLSL2GLSLConverterImpl::ConversionStream::InsertIncludes( String &GLSLSourc
GLSLSource.erase( IncludeStartPos, Pos );
// Convert the name to lower case
- String IncludeFileLowercase = IncludeName;
- std::transform( IncludeFileLowercase.begin(), IncludeFileLowercase.end(), IncludeFileLowercase.begin(), ::tolower );
+ String IncludeFileLowercase = StrToLower(IncludeName);
// Insert the lower-case name into the set
auto It = ProcessedIncludes.insert( IncludeFileLowercase );
// If the name was actually inserted, which means the include encountered for the first time,
@@ -2507,9 +2507,8 @@ void HLSL2GLSLConverterImpl::ConversionStream::ParseShaderParameter(TokenListTyp
// ^
VERIFY_PARSER_STATE( Token, Token != m_Tokens.end(), "Unexpected end of file while looking for semantic for argument \"", ParamInfo.Name, '\"' );
VERIFY_PARSER_STATE( Token, Token->Type == TokenType::Identifier, "Missing semantic for argument \"", ParamInfo.Name, '\"' );
- ParamInfo.Semantic = Token->Literal;
// Transform to lower case - semantics are case-insensitive
- std::transform( ParamInfo.Semantic.begin(), ParamInfo.Semantic.end(), ParamInfo.Semantic.begin(), ::tolower );
+ ParamInfo.Semantic = StrToLower(Token->Literal);
++Token;
// out float4 Color : SV_Target,
@@ -2791,9 +2790,8 @@ void HLSL2GLSLConverterImpl::ConversionStream::ProcessFunctionParameters( TokenL
// SemanticToken
VERIFY_PARSER_STATE( SemanticToken, SemanticToken != m_Tokens.end(), "Unexpected EOF" );
VERIFY_PARSER_STATE( SemanticToken, SemanticToken->Type == TokenType::Identifier, "Exepcted semantic for the return argument ");
- RetParam.Semantic = SemanticToken->Literal;
// Transform to lower case - semantics are case-insensitive
- std::transform( RetParam.Semantic.begin(), RetParam.Semantic.end(), RetParam.Semantic.begin(), ::tolower );
+ RetParam.Semantic = StrToLower(SemanticToken->Literal);
++SemanticToken;
// float4 TestPS ( in VSOutput In ) : SV_Target
// {
@@ -3474,7 +3472,8 @@ void HLSL2GLSLConverterImpl::ConversionStream::ProcessShaderAttributes(TokenList
// [domain("quad")]
// ^
auto &Attrib = TmpToken->Literal;
- std::transform( Attrib.begin(), Attrib.end(), Attrib.begin(), ::tolower );
+ StrToLowerInPlace(Attrib);
+
++TmpToken;
VERIFY_PARSER_STATE( TmpToken, TmpToken != m_Tokens.end() && TmpToken->Type == TokenType::OpenBracket, "\'(\' expected");
String AttribValue;