[SOL/SPIDER]
authorAmine Khaldi <amine.khaldi@reactos.org>
Wed, 5 Oct 2011 17:54:07 +0000 (17:54 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Wed, 5 Oct 2011 17:54:07 +0000 (17:54 +0000)
* Reduce the scope of some variables.

svn path=/trunk/; revision=54012

reactos/base/applications/games/solitaire/solitaire.cpp
reactos/base/applications/games/spider/spigame.cpp

index bf45a53..1778cee 100644 (file)
@@ -235,7 +235,6 @@ VOID ShowGameOptionsDlg(HWND hwnd)
 {
     DWORD dwOldOptions = dwOptions;
     RECT rcMain, rcStatus;
-    int nWidth, nHeight, nStatusHeight;
 
     if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_OPTIONS), hwnd, OptionsDlgProc))
     {
@@ -244,6 +243,8 @@ VOID ShowGameOptionsDlg(HWND hwnd)
 
         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;
index 5e75ebb..bf7465b 100644 (file)
@@ -127,10 +127,10 @@ void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int NumDragCards)
 {
     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 @@ void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int NumDragCards)
                 /* 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);