remove annoying warning on MSVC 19.37.32822

`register` keyword does exactly nothing:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5033?view=msvc-170
This commit is contained in:
Marco Antonio Jaguaribe Costa
2023-10-07 09:13:55 -03:00
committed by majcosta
parent 8d49e74df4
commit b68f206969
3 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -102,7 +102,7 @@ public:
return (returnHeap);
}
int moveUp(register int index, KEY newKey)
int moveUp(int index, KEY newKey)
{
while (index > 1) {
int current2 = index>>1;//divided by 2
@@ -120,7 +120,7 @@ public:
int moveDown(int index, KEY currentKey)
{
register int current2 = index+index;
int current2 = index+index;
while (current2 < heapCount) {
if (current2+1 < heapCount) {
//choose child to possibly move
@@ -314,7 +314,7 @@ insert:
int findData(const T data) const
{
register int current;
int current;
for (current = heapCount-1; current > 0; --current) {
if (BinaryHeap[current].data == data) {
break;
+8 -8
View File
@@ -373,7 +373,7 @@ BOOLEAN HasAdjTile( const INT32& ubX, const INT32& ubY, const INT32& ubZ )
void AddCoverObjectsToViewArea()
{
register INT32 ubX, ubY, ubZ;
INT32 ubX, ubY, ubZ;
BOOLEAN fChanged = FALSE;
BOOLEAN fNightTime = NightTime( );
@@ -406,7 +406,7 @@ void RemoveCoverObjectsFromViewArea()
return;
// Go through the whole gCoverViewArea when removing cover objects. Otherwise we don't clean up tiles that are not in the viewport which results in an annoying visual bug.
register INT32 ubX, ubY, ubZ;
INT32 ubX, ubY, ubZ;
BOOLEAN fChanged = FALSE;
for ( ubX = 0; ubX < COVER_X_CELLS; ++ubX )
@@ -669,8 +669,8 @@ static void CalculateCoverFromEnemies()
void CalculateCover()
{
register INT32 ubX, ubY;
register INT8 ubZ;
INT32 ubX, ubY;
INT8 ubZ;
SOLDIERTYPE* pSoldier;
if (gusSelectedSoldier == NOBODY)
@@ -1144,7 +1144,7 @@ void AddMinesObjectsToViewArea()
if ( gsMaxCellY < 0 )
return;
register INT32 ubX, ubY, ubZ;
INT32 ubX, ubY, ubZ;
BOOLEAN fChanged = FALSE;
BOOLEAN fNightTime = NightTime( );
@@ -1503,7 +1503,7 @@ void AddTraitObjectsToViewArea()
if ( gsMaxCellY < 0 )
return;
register INT32 ubX, ubY, ubZ;
INT32 ubX, ubY, ubZ;
BOOLEAN fChanged = FALSE;
BOOLEAN fNightTime = NightTime( );
@@ -1657,7 +1657,7 @@ void AddTrackerObjectsToViewArea( )
if ( gsMaxCellY < 0 )
return;
register INT32 ubX, ubY, ubZ;
INT32 ubX, ubY, ubZ;
BOOLEAN fChanged = FALSE;
BOOLEAN fNightTime = NightTime();
@@ -1731,7 +1731,7 @@ void CalculateFortify( )
if ( gsMaxCellY < 0 )
return;
register INT32 ubX, ubY, ubZ;
INT32 ubX, ubY, ubZ;
BOOLEAN fChanged = FALSE;
BOOLEAN fNightTime = NightTime( );
+2 -2
View File
@@ -15271,7 +15271,7 @@ BOOLEAN HasItemFlag( UINT16 usItem, UINT64 aFlag )
// Flugente: get first item number that has this flag. Use with caution, as we search in all items
BOOLEAN GetFirstItemWithFlag( UINT16* pusItem, UINT64 aFlag )
{
register UINT16 i;
UINT16 i;
for ( i = 1; i < gMAXITEMS_READ; ++i )
{
if ( HasItemFlag(i, aFlag) )
@@ -15537,7 +15537,7 @@ BOOLEAN GetFirstClothesItemWithSpecificData( UINT16* pusItem, PaletteRepID aPalV
UINT32 bestclothestype = 999999;
UINT16 bestitem = 0;
register UINT16 i;
UINT16 i;
for ( i = 1; i < gMAXITEMS_READ; ++i )
{
if ( Item[i].clothestype > 0 )