Author: akhaldi
Date: Wed Oct 5 17:54:07 2011
New Revision: 54012
URL:
http://svn.reactos.org/svn/reactos?rev=54012&view=rev
Log:
[SOL/SPIDER]
* Reduce the scope of some variables.
Modified:
trunk/reactos/base/applications/games/solitaire/solitaire.cpp
trunk/reactos/base/applications/games/spider/spigame.cpp
Modified: trunk/reactos/base/applications/games/solitaire/solitaire.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
==============================================================================
--- trunk/reactos/base/applications/games/solitaire/solitaire.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/games/solitaire/solitaire.cpp [iso-8859-1] Wed Oct 5
17:54:07 2011
@@ -235,7 +235,6 @@
{
DWORD dwOldOptions = dwOptions;
RECT rcMain, rcStatus;
- int nWidth, nHeight, nStatusHeight;
if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_OPTIONS), hwnd, OptionsDlgProc))
{
@@ -244,6 +243,8 @@
if ((dwOldOptions & OPTION_SHOW_STATUS) != (dwOptions &
OPTION_SHOW_STATUS))
{
+ int nWidth, nHeight, nStatusHeight;
+
GetClientRect(hwndMain, &rcMain);
nHeight = rcMain.bottom - rcMain.top;
nWidth = rcMain.right - rcMain.left;
Modified: trunk/reactos/base/applications/games/spider/spigame.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
==============================================================================
--- trunk/reactos/base/applications/games/spider/spigame.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/games/spider/spigame.cpp [iso-8859-1] Wed Oct 5
17:54:07 2011
@@ -127,10 +127,10 @@
{
CardStack temp, fakeDeck = pDeck->GetCardStack();
fGameStarted = true;
- int i, j, facedown, faceup;
if (fakeDeck.NumCards() != 0 && deck.NumCards() != 0)
{
+ int i, facedown, faceup;
/* Add one card to every stack */
for (i = 0; i < NUM_STACKS; i++)
{
@@ -145,6 +145,7 @@
/* Check stack finished, remove cards if so */
if (stackLookingGood(temp, NUM_ONECOLOR_CARDS - 1))
{
+ int j;
for (j = 0; j < NUM_ONECOLOR_CARDS; j++)
{
temp.RemoveCard(0);