Browse Source

Removed explicit usage of the 'register' keyword.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
master
Michele Calgaro 2 months ago
parent
commit
f430b984f3
Signed by: MicheleC <michele.calgaro@yahoo.it> GPG Key ID: 2A75B7CA8ADED5CF
5 changed files with 14 additions and 14 deletions
  1. +2
    -2
      knights/board_2d.cpp
  2. +1
    -1
      knights/knightspixcache.cpp
  3. +8
    -8
      knights/logic.cpp
  4. +2
    -2
      knights/match.cpp
  5. +1
    -1
      knights/pgn.cpp

+ 2
- 2
knights/board_2d.cpp View File

@@ -232,7 +232,7 @@ void board_2d::resizeBoard( void )
///////////////////////////////////////
void board_2d::redrawAll( void )
{
register char tmp(0);
char tmp(0);

if( init )
return;
@@ -583,7 +583,7 @@ void board_2d::mouseMoveEvent( TQMouseEvent *event )
TQPixmap board_2d::getChessman( const int &pos )
{
TQPixmap tmp;
register char type, army;
char type, army;

if( pos == premoveTo )
{


+ 1
- 1
knights/knightspixcache.cpp View File

@@ -63,7 +63,7 @@ void KnightsPixCache::clear( void )
void KnightsPixCache::cleanCache( const unsigned int &space )
{
pixmapList::Iterator tmpIT;
register unsigned int age;
unsigned int age;

while( bytesUsed + space > bytesTotal )
{


+ 8
- 8
knights/logic.cpp View File

@@ -90,7 +90,7 @@ bool logic::isChessman( const char ChessmanPtr )
///////////////////////////////////////
void logic::clearBoard( void )
{
for( register int tmp = 0; tmp < 64; tmp++ )
for( int tmp = 0; tmp < 64; tmp++ )
{
chessman[tmp].Type = Null;
current[tmp].ManPtr = Null;
@@ -120,7 +120,7 @@ void logic::Init( const int Var )
///////////////////////////////////////
void logic::Init_Standard( void )
{
register int tmp;
int tmp;

clearBoard();
for( tmp = 0; tmp < 32; tmp++ )
@@ -394,7 +394,7 @@ void logic::writeSAN( void )
Position backup[64];
bool SANambig(FALSE);
bool SANambig2(FALSE);
register char tmp, manPtr, toPtr, fromPtr;
char tmp, manPtr, toPtr, fromPtr;
TQString SAN;

/*
@@ -528,7 +528,7 @@ void logic::writeSAN( void )
TQString logic::board( void )
{
TQString output;
register int tmp(0), tmpMan(0), cR(7), cF(0);
int tmp(0), tmpMan(0), cR(7), cF(0);

while( tmp != 64 )
{
@@ -697,7 +697,7 @@ void logic::setBoard( const TQString &board, const short ppf )
///////////////////////////////////////
int logic::getKing( const bool Army )
{
register int tmp;
int tmp;
for( tmp = 0; tmp < 64; tmp++ )
{
if( ( chessman[tmp].Army == Army ) && ( chessman[tmp].Type == King ) )
@@ -715,7 +715,7 @@ int logic::getKing( const bool Army )
///////////////////////////////////////
bool logic::isCheck( const bool Army )
{
register char tmp(0), currentKing( getKing(Army) );
char tmp(0), currentKing( getKing(Army) );

for( tmp = 0; tmp < 64; tmp++ )
{
@@ -735,7 +735,7 @@ bool logic::isCheck( const bool Army )
///////////////////////////////////////
bool logic::isLegal( const bool Army )
{
register int tmp(0), tmp2(0), count(0);
int tmp(0), tmp2(0), count(0);

for( tmp2 = 0; tmp2 < 64; tmp2++ )
{
@@ -1046,7 +1046,7 @@ void logic::HashLegal( const char Man, const bool Recursion )
void logic::_HashLegal( const bool Recursion )
{
/* Used for loops and positions */
register int Ptr(0), tmp(0), tmp2(0);
int Ptr(0), tmp(0), tmp2(0);

/* Used to calculate a position relative to a given position */
int dirF(0), dirR(0);


+ 2
- 2
knights/match.cpp View File

@@ -172,7 +172,7 @@ void match::tick(void)
void match::clearSelections( void )
{
bool commitFlag( FALSE );
register char tmp;
char tmp;

if( ICSGameMode == Null )
{
@@ -386,7 +386,7 @@ TQString match::clock( const bool Army )
void match::slot_Select( int position )
{
bool preMoving(FALSE);
register char tmp, army, selected(Null);
char tmp, army, selected(Null);

if( Paused ) return;
/* Clear all non-SELECT notes */


+ 1
- 1
knights/pgn.cpp View File

@@ -305,7 +305,7 @@ void pgn::init( void )
///////////////////////////////////////
int pgn::scan( void )
{
register int Section(0);
int Section(0);
TQChar c;

clearTags();


Loading…
Cancel
Save