From bac3931806a3f30812f5bdc65e98dd980dc75a92 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 30 Jan 2020 20:17:51 +0900 Subject: Removed explicit usage of the 'register' keyword. Signed-off-by: Michele Calgaro (cherry picked from commit f430b984f355e94ad020b4c03b874cd553ad760e) --- knights/board_2d.cpp | 4 ++-- knights/knightspixcache.cpp | 2 +- knights/logic.cpp | 16 ++++++++-------- knights/match.cpp | 4 ++-- knights/pgn.cpp | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/knights/board_2d.cpp b/knights/board_2d.cpp index 5f69f28..a0170a5 100644 --- a/knights/board_2d.cpp +++ b/knights/board_2d.cpp @@ -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 ) { diff --git a/knights/knightspixcache.cpp b/knights/knightspixcache.cpp index 989fcfb..d52fb59 100644 --- a/knights/knightspixcache.cpp +++ b/knights/knightspixcache.cpp @@ -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 ) { diff --git a/knights/logic.cpp b/knights/logic.cpp index 0622a21..94fcb44 100644 --- a/knights/logic.cpp +++ b/knights/logic.cpp @@ -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); diff --git a/knights/match.cpp b/knights/match.cpp index 4db34a9..a398e86 100644 --- a/knights/match.cpp +++ b/knights/match.cpp @@ -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 */ diff --git a/knights/pgn.cpp b/knights/pgn.cpp index 7787b3f..4dc14f5 100644 --- a/knights/pgn.cpp +++ b/knights/pgn.cpp @@ -305,7 +305,7 @@ void pgn::init( void ) /////////////////////////////////////// int pgn::scan( void ) { - register int Section(0); + int Section(0); TQChar c; clearTags(); -- cgit v1.2.1