aboutsummaryrefslogtreecommitdiff
path: root/lib/win32/Effects11/Binary/SOParser.h
diff options
context:
space:
mode:
authorthexai <58434170+thexai@users.noreply.github.com>2022-11-12 11:01:14 +0100
committerthexai <58434170+thexai@users.noreply.github.com>2022-11-12 11:01:14 +0100
commit9dfd20a8ee9d294855a25927d7abbc0bad1ba913 (patch)
tree34a1775c6dd4a471fff46b9db20dd68abde95fba /lib/win32/Effects11/Binary/SOParser.h
parent04f1417532fd43a2c8f87f7fd001f6a23421961c (diff)
[Windows] Sync Effects11 with upstream - Fix build with Visual Studio 2022 v17.4.0
https://github.com/microsoft/FX11
Diffstat (limited to 'lib/win32/Effects11/Binary/SOParser.h')
-rw-r--r--lib/win32/Effects11/Binary/SOParser.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/win32/Effects11/Binary/SOParser.h b/lib/win32/Effects11/Binary/SOParser.h
index 6ae5d5424f..412ea15e91 100644
--- a/lib/win32/Effects11/Binary/SOParser.h
+++ b/lib/win32/Effects11/Binary/SOParser.h
@@ -3,7 +3,7 @@
//
// Direct3D 11 Effects Stream Out Decl Parser
//
-// Copyright (c) Microsoft Corporation. All rights reserved.
+// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//
// http://go.microsoft.com/fwlink/p/?LinkId=271568
@@ -108,7 +108,6 @@ protected:
HRESULT Parse( _In_ uint32_t Stream, _In_z_ LPCSTR pString )
{
HRESULT hr = S_OK;
- LPSTR pSemantic = nullptr;
m_pError[0] = 0;
@@ -123,7 +122,7 @@ protected:
VN( m_SemanticString[Stream] = new char[len + 1] );
strcpy_s( m_SemanticString[Stream], len + 1, pString );
- pSemantic = m_SemanticString[Stream];
+ LPSTR pSemantic = m_SemanticString[Stream];
while( true )
{
@@ -246,8 +245,7 @@ lExit:
_Analysis_assume_( ppSemantic && *ppSemantic );
HRESULT hr = S_OK;
- LPSTR pColon = strchr( *ppSemantic, ':' );
- int outputSlot = 0;
+ LPSTR pColon = strchr( *ppSemantic, ':' );
if( pColon == nullptr )
return S_OK;
@@ -260,7 +258,7 @@ lExit:
}
*pColon = '\0';
- outputSlot = atoi(*ppSemantic);
+ int outputSlot = atoi( *ppSemantic );
if( outputSlot < 0 || outputSlot > 255 )
{
strcpy_s( m_pError, MAX_ERROR_SIZE,