Skip to content

Commit 40a21af

Browse files
authored
[CORE][GEN][ZH] Make tools compile with clang-cl in VS2022 (#1039)
1 parent d19cccd commit 40a21af

File tree

14 files changed

+18
-18
lines changed

14 files changed

+18
-18
lines changed

Core/Tools/ImagePacker/Source/WindowProcedures/PreviewProc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ LRESULT CALLBACK PreviewProc( HWND hWnd, UINT message,
112112
page->getPixel( x, y, &r, &g, &b );
113113

114114
// create a new pen of the right color
115-
pen = CreatePen( 1, 1, RGB( r, g, b, ) );
115+
pen = CreatePen( 1, 1, RGB( r, g, b ) );
116116

117117
// select pen into hdc
118118
prevPen = (HPEN)SelectObject( hdc, pen );

Core/Tools/W3DView/BoneMgrDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ BoneMgrDialogClass::Update_Controls (HTREEITEM selected_item)
373373

374374
// Change the text of the group box to reflect the bone name
375375
CString text;
376-
text.Format ("Bone: %s", m_BoneName);
376+
text.Format ("Bone: %s", static_cast<const char*>(m_BoneName));
377377
SetDlgItemText (IDC_BONE_GROUPBOX, text);
378378
return ;
379379
}

Core/Tools/W3DView/HierarchyPropPage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ CHierarchyPropPage::OnInitDialog (void)
106106
if (pCHierarchy)
107107
{
108108
CString stringDesc;
109-
stringDesc.Format (IDS_HIERARCHY_PROP_DESC, m_stringHierarchyName);
109+
stringDesc.Format (IDS_HIERARCHY_PROP_DESC, static_cast<const char*>(m_stringHierarchyName));
110110

111111
// Put the description onto the dialog
112112
SetDlgItemText (IDC_DESCRIPTION, stringDesc);

Core/Tools/W3DView/MainFrm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3847,7 +3847,7 @@ CMainFrame::OnAddToLineup (void)
38473847
{
38483848
// Tell the user that the render object could not be created.
38493849
CString msg;
3850-
msg.Format("Unable to create render object '%s'!", dlg.m_Object);
3850+
msg.Format("Unable to create render object '%s'!", static_cast<const char*>(dlg.m_Object));
38513851
::AfxMessageBox(msg, MB_OK | MB_ICONINFORMATION);
38523852
}
38533853
}

Core/Tools/W3DView/MeshPropPage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ CMeshPropPage::OnInitDialog (void)
107107
if (pCMesh)
108108
{
109109
CString stringDesc;
110-
stringDesc.Format (IDS_MESH_PROP_DESC, m_stringMeshName);
110+
stringDesc.Format (IDS_MESH_PROP_DESC, static_cast<const char*>(m_stringMeshName));
111111

112112
// Put the description onto the dialog
113113
SetDlgItemText (IDC_DESCRIPTION, stringDesc);

Generals/Code/Tools/ParticleEditor/CColorAlphaDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ BOOL CColorAlphaDialog::OnInitDialog()
219219
return CDialog::OnInitDialog();
220220
}
221221

222-
#define ONCOLORDLG(x) void CColorAlphaDialog::OnColor##x##() { onColorPress( x ); }
222+
#define ONCOLORDLG(x) void CColorAlphaDialog::OnColor##x() { onColorPress( x ); }
223223
ONCOLORDLG(1)
224224
ONCOLORDLG(2)
225225
ONCOLORDLG(3)

Generals/Code/Tools/WorldBuilder/include/wbview3d.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include "dx8wrapper.h"
4040

4141
//#include "GameLogic/Module/BodyModule.h" -- Yikes... not necessary to include this! (KM)
42-
enum BodyDamageType; //Ahhhh much better!
42+
enum BodyDamageType CPP_11(: Int); //Ahhhh much better!
4343

4444
class WorldHeightMap;
4545
class LayerClass;

Generals/Code/Tools/WorldBuilder/src/DrawObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ Int DrawObject::initData(void)
264264
m_vertexMaterialClass=VertexMaterialClass::Get_Preset(VertexMaterialClass::PRELIT_DIFFUSE);
265265

266266
//use a multi-texture shader: (text1*diffuse)*text2.
267-
m_shaderClass = ShaderClass::ShaderClass(SC_OPAQUE);//_PresetOpaque2DShader;//ShaderClass(SC_OPAQUE); //_PresetOpaqueShader;
267+
m_shaderClass = ShaderClass(SC_OPAQUE);//_PresetOpaque2DShader;//ShaderClass(SC_OPAQUE); //_PresetOpaqueShader;
268268

269269
m_shaderClass = ShaderClass::_PresetOpaque2DShader;
270270
updateForWater();

Generals/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,11 +620,11 @@ void CWorldBuilderDoc::OnJumpToGame()
620620
CString filename;
621621
DEBUG_LOG(("strTitle=%s strPathName=%s\n", m_strTitle, m_strPathName));
622622
if (strstr(m_strPathName, TheGlobalData->getPath_UserData().str()) != NULL)
623-
filename.Format("%sMaps\\%s", TheGlobalData->getPath_UserData().str(), m_strTitle);
623+
filename.Format("%sMaps\\%s", TheGlobalData->getPath_UserData().str(), static_cast<const char*>(m_strTitle));
624624
else
625-
filename.Format("Maps\\%s", m_strTitle);
625+
filename.Format("Maps\\%s", static_cast<const char*>(m_strTitle));
626626

627-
/*int retval =*/ _spawnl(_P_NOWAIT, "\\projects\\rts\\run\\rtsi.exe", "ignored", "-scriptDebug", "-win", "-file", filename, NULL);
627+
/*int retval =*/ _spawnl(_P_NOWAIT, "\\projects\\rts\\run\\rtsi.exe", "ignored", "-scriptDebug", "-win", "-file", static_cast<const char*>(filename), NULL);
628628
} catch (...) {
629629
}
630630
}

GeneralsMD/Code/Tools/ParticleEditor/CColorAlphaDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ BOOL CColorAlphaDialog::OnInitDialog()
219219
return CDialog::OnInitDialog();
220220
}
221221

222-
#define ONCOLORDLG(x) void CColorAlphaDialog::OnColor##x##() { onColorPress( x ); }
222+
#define ONCOLORDLG(x) void CColorAlphaDialog::OnColor##x() { onColorPress( x ); }
223223
ONCOLORDLG(1)
224224
ONCOLORDLG(2)
225225
ONCOLORDLG(3)

0 commit comments

Comments
 (0)