Skip to content

Commit bd00fa1

Browse files
committed
cleanup(warn): Fix warning C4805.
1 parent 4adc05c commit bd00fa1

File tree

11 files changed

+21
-21
lines changed

11 files changed

+21
-21
lines changed

Code/Commando/combatgmode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ void CombatGameModeClass::Load_Registry_Keys(void)
12131213

12141214
//TSS
12151215
DefaultToFirstPerson = registry->Get_Int( "DefaultToFirstPerson", DefaultToFirstPerson );
1216-
CombatManager::Set_First_Person_Default(DefaultToFirstPerson == true);
1216+
CombatManager::Set_First_Person_Default(DefaultToFirstPerson != 0);
12171217
}
12181218
delete registry;
12191219
}

Code/Launcher/dictionary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Dictionary
8888
uint32 size; // size of table
8989
uint32 tableBits; // table is 2^tableBits big
9090
uint32 log2Size; // Junk variable
91-
bit8 keepSize; // If true don't shrink or expand
91+
bool keepSize; // If true don't shrink or expand
9292

9393
uint32 (* hashFunc)(K &key); // User provided hash function
9494
uint32 keyHash(IN K &key); // This will reduce to correct range

Code/Launcher/findpatch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void Delete_Patches(ConfigFile &config)
165165
//
166166
// Loop through all the application directories in the config file
167167
//
168-
while (Get_App_Dir(dir,MAX_PATH,config,i++)==true)
168+
while (Get_App_Dir(dir,MAX_PATH,config,i++)!=0)
169169
{
170170
// Make sure path is at least 3 for "c:\". I really hope nobody's
171171
// dumb enough to install a game to the root directory. (It's OK though

Code/Tools/LevelEdit/Export.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,9 +693,9 @@ ExporterClass::Delete_File (LPCTSTR filename)
693693
if ((attributes != 0xFFFFFFFF) &&
694694
((attributes & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY))
695695
{
696-
retval = (::RemoveDirectory (filename) == true);
696+
retval = (::RemoveDirectory (filename) != 0);
697697
} else {
698-
retval = (::DeleteFile (filename) == true);
698+
retval = (::DeleteFile (filename) != 0);
699699
}
700700
}
701701

Code/Tools/LevelEdit/VisStatsDialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ VisSectorSortCompareFn (LPARAM param1, LPARAM param2, LPARAM sort_info)
281281
VisSectorStatsClass *stats2 = (VisSectorStatsClass *)param2;
282282

283283
LONG column_id = LOWORD (sort_info);
284-
BOOL ascending = HIWORD (sort_info);
284+
bool ascending = HIWORD (sort_info) != 0;
285285

286286
if (stats1 != NULL && stats2 != NULL) {
287287

@@ -302,7 +302,7 @@ VisSectorSortCompareFn (LPARAM param1, LPARAM param2, LPARAM sort_info)
302302
//
303303
// Invert the sort if necessary
304304
//
305-
if (ascending != true) {
305+
if (!ascending) {
306306
retval = -retval;
307307
}
308308

Code/Tools/W3DView/GraphicView.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,14 +469,14 @@ CGraphicView::RepaintView
469469

470470
// Perform the object rotation if necessary
471471
if ((m_objectRotation != NoRotation) &&
472-
(bUpdateAnimation == true))
472+
(bUpdateAnimation != 0))
473473
{
474474
Rotate_Object ();
475475
}
476476

477477
// Perform the light rotation if necessary
478478
if ((m_LightRotation != NoRotation) &&
479-
(bUpdateAnimation == true))
479+
(bUpdateAnimation != 0))
480480
{
481481
Rotate_Light ();
482482
}
@@ -756,9 +756,9 @@ CGraphicView::OnLButtonUp
756756
}
757757

758758
// Mouse button is up
759-
m_bMouseDown = false;
759+
m_bMouseDown = FALSE;
760760

761-
if (m_bRMouseDown == true)
761+
if (m_bRMouseDown == TRUE)
762762
{
763763
::SetCursor (::LoadCursor (::AfxGetResourceHandle (), MAKEINTRESOURCE (IDC_CURSOR_ZOOM)));
764764
((CW3DViewDoc *)GetDocument())->Set_Cursor ("zoom.tga");

Code/Tools/W3DView/SceneLightDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ CSceneLightDialog::OnCancel (void)
271271
// Restore the intensity, attenuation, and distance settings
272272
pCDoc->GetSceneLight ()->Set_Intensity (m_InitialIntensity);
273273
pCDoc->GetSceneLight ()->Set_Far_Attenuation_Range (m_InitialStartAtten, m_InitialEndAtten);
274-
pCDoc->GetSceneLight ()->Set_Flag (LightClass::FAR_ATTENUATION, (m_InitialAttenOn == true));
274+
pCDoc->GetSceneLight ()->Set_Flag (LightClass::FAR_ATTENUATION, (m_InitialAttenOn != 0));
275275
Update_Distance (m_InitialDistance);
276276
}
277277

Code/Tools/W3DView/Utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ Get_File_Time
816816
if (hfile != INVALID_HANDLE_VALUE) {
817817

818818
// Get the mod times for this file
819-
retval = (::GetFileTime (hfile, pcreation_time, paccess_time, pwrite_time) == true);
819+
retval = (::GetFileTime (hfile, pcreation_time, paccess_time, pwrite_time) != 0);
820820

821821
// Close the file
822822
SAFE_CLOSE (hfile);
@@ -944,7 +944,7 @@ Copy_File
944944

945945
// Perform the copy operation!
946946
if (allow_copy) {
947-
retval = (::CopyFile (existing_filename, new_filename, false) == true);
947+
retval = (::CopyFile (existing_filename, new_filename, false) != 0);
948948
}
949949

950950
// Return the true/false result code

Code/Tools/W3DView/W3DViewDoc.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ CW3DViewDoc::CW3DViewDoc (void)
104104
m_pCAnimCombo (NULL),
105105
m_pCBackgroundBMP (NULL),
106106
m_CurrentFrame (0),
107-
m_bAnimBlend (true),
107+
m_bAnimBlend (TRUE),
108108
m_bAnimateCamera (false),
109109
m_bAutoCameraReset (true),
110110
m_bOneTimeReset (true),
@@ -118,8 +118,8 @@ CW3DViewDoc::CW3DViewDoc (void)
118118
m_bCompress_channel_Q(false)
119119
{
120120
// Read the camera animation settings from the registry
121-
m_bAnimateCamera = ((BOOL)theApp.GetProfileInt ("Config", "AnimateCamera", 0)) == true;
122-
m_bAutoCameraReset = ((BOOL)theApp.GetProfileInt ("Config", "ResetCamera", 1)) == true;
121+
m_bAnimateCamera = ((BOOL)theApp.GetProfileInt ("Config", "AnimateCamera", 0)) != 0;
122+
m_bAutoCameraReset = ((BOOL)theApp.GetProfileInt ("Config", "ResetCamera", 1)) != 0;
123123
return ;
124124
}
125125

@@ -3032,8 +3032,8 @@ CW3DViewDoc::Save_Camera_Settings (void)
30323032
void
30333033
CW3DViewDoc::Load_Camera_Settings (void)
30343034
{
3035-
m_ManualFOV = (theApp.GetProfileInt ("Config", "UseManualFOV", 0) == true);
3036-
m_ManualClipPlanes = (theApp.GetProfileInt ("Config", "UseManualClipPlanes", 0) == true);
3035+
m_ManualFOV = (theApp.GetProfileInt ("Config", "UseManualFOV", 0) != 0);
3036+
m_ManualClipPlanes = (theApp.GetProfileInt ("Config", "UseManualClipPlanes", 0) != 0);
30373037

30383038
CGraphicView *graphic_view = GetGraphicView ();
30393039
if (graphic_view != NULL) {

Code/wwlib/LaunchWeb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,5 @@ bool LaunchWebBrowser(const char* url)
119119

120120
assert(createSuccess && "Failed to launch default WebBrowser.");
121121

122-
return (true == createSuccess);
122+
return (createSuccess != 0);
123123
}

0 commit comments

Comments
 (0)