1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0024085: Eliminate compiler warning C4706 in MSVC++ with warning level 4

Got rid from most cases which led to Warning c4706
Tiny code style corrections
This commit is contained in:
omy
2013-08-01 12:20:35 +04:00
parent 304c45c83f
commit 773f53f1ec
13 changed files with 82 additions and 121 deletions

View File

@@ -2024,11 +2024,8 @@ Standard_Boolean Init_Appli(HINSTANCE hInst,
** Enter the application message-polling loop. This is the anchor for
** the application.
*/
if(Draw_IsConsoleSubsystem)
hWndFrame = NULL;
else if (hWndFrame = CreateAppWindow(hInst))
hWndFrame = !Draw_IsConsoleSubsystem ? CreateAppWindow (hInst) : NULL;
if (hWndFrame != NULL)
{
ShowWindow(hWndFrame,nShow);
UpdateWindow(hWndFrame);

View File

@@ -18,12 +18,8 @@
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
#ifdef WNT
#include <windows.h>
#include <DrawRessource.h>
#include <init.h>
@@ -80,11 +76,12 @@ LRESULT APIENTRY WndProc(HWND hWndFrame, UINT wMsg, WPARAM wParam, LPARAM lParam
\*--------------------------------------------------------------------------*/
BOOL CreateProc(HWND hWndFrame)
{
HWND hWnd;
// Save hWnd in the main window in extra memory in 0
if (hWnd = CreateMDIClientWindow(hWndFrame))
HWND hWnd = CreateMDIClientWindow (hWndFrame);
if (hWnd != NULL)
{
// Save hWnd in the main window in extra memory in 0
SetWindowLong(hWndFrame, CLIENTWND, (LONG)hWnd);
}
return(TRUE);
}
@@ -96,30 +93,30 @@ BOOL CreateProc(HWND hWndFrame)
\*--------------------------------------------------------------------------*/
BOOL CommandProc(HWND hWndFrame, WPARAM wParam, LPARAM /*lParam*/)
{
HWND hWndClient; // Handle on window MDI
HWND hWndActive;
hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND);
// Handle on window MDI
HWND hWndClient = (HWND)GetWindowLong (hWndFrame, CLIENTWND);
switch (LOWORD(wParam))
{
case IDM_WINDOW_NEXT :
if(hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND))
hWndActive = (HWND)SendMessage(hWndClient, WM_MDIGETACTIVE, 0, 0l);
SendMessage(hWndClient, WM_MDINEXT, (WPARAM)hWndActive, 0l);
if(hWndClient)
{
HWND hWndActive = (HWND)SendMessage(hWndClient, WM_MDIGETACTIVE, 0, 0l);
SendMessage(hWndClient, WM_MDINEXT, (WPARAM)hWndActive, 0l);
}
break;
case IDM_WINDOW_CASCADE :
if(hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND))
if(hWndClient)
SendMessage(hWndClient, WM_MDICASCADE, 0, 0l);
break;
case IDM_WINDOW_TILEHOR :
if(hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND))
if(hWndClient)
SendMessage(hWndClient, WM_MDITILE, MDITILE_HORIZONTAL, 0l);
break;
case IDM_WINDOW_TILEVERT :
if(hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND))
if(hWndClient)
SendMessage(hWndClient, WM_MDITILE, MDITILE_VERTICAL, 0l);
break;