code cleanup: quiet some windows warnings.

This commit is contained in:
Campbell Barton 2012-09-15 04:57:51 +00:00
parent f9d9459e3f
commit abce099804
5 changed files with 21 additions and 28 deletions

@ -676,7 +676,7 @@ GHOST_TSuccess GHOST_WindowCarbon::setWindowCursorShape(GHOST_TStandardCursor sh
return GHOST_kSuccess;
}
#if 0
#if 0 /* UNUSED */
/** Reverse the bits in a GHOST_TUns8 */
static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
{

@ -20,7 +20,7 @@
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
* Contributor(s): Maarten Gribnau.
*
* ***** END GPL LICENSE BLOCK *****
*/
@ -29,13 +29,6 @@
* \ingroup GHOST
*/
/**
* Copyright (C) 2001 NaN Technologies B.V.
* \author Maarten Gribnau
* \date May 10, 2001
*/
#include <string.h>
#include "GHOST_WindowWin32.h"
#include "GHOST_SystemWin32.h"
@ -50,7 +43,7 @@
// MSVC6 still doesn't define M_PI
#ifndef M_PI
#define M_PI 3.1415926536
# define M_PI 3.1415926536
#endif
// Some more multisample defines
@ -58,14 +51,14 @@
#define WGL_SAMPLES_ARB 0x2042
// win64 doesn't define GWL_USERDATA
#ifdef WIN32
#ifndef GWL_USERDATA
#define GWL_USERDATA GWLP_USERDATA
#define GWL_WNDPROC GWLP_WNDPROC
#endif
#ifdef WIN32 /* why? - probably should remove */
# ifndef GWL_USERDATA
# define GWL_USERDATA GWLP_USERDATA
# define GWL_WNDPROC GWLP_WNDPROC
# endif
#endif
wchar_t *GHOST_WindowWin32::s_windowClassName = L"GHOST_WindowClass";
const wchar_t *GHOST_WindowWin32::s_windowClassName = L"GHOST_WindowClass";
const int GHOST_WindowWin32::s_maxTitleLength = 128;
HGLRC GHOST_WindowWin32::s_firsthGLRc = NULL;
HDC GHOST_WindowWin32::s_firstHDC = NULL;
@ -149,7 +142,6 @@ GHOST_WindowWin32::GHOST_WindowWin32(
m_tablet(0),
m_maxPressure(0),
m_multisample(numOfAASamples),
m_parentWindowHwnd(parentwindowhwnd),
m_multisampleEnabled(msEnabled),
m_msPixelFormat(msPixelFormat),
//For recreation
@ -160,7 +152,8 @@ GHOST_WindowWin32::GHOST_WindowWin32(
m_height(height),
m_normal_state(GHOST_kWindowStateNormal),
m_stereo(stereoVisual),
m_nextWindow(NULL)
m_nextWindow(NULL),
m_parentWindowHwnd(parentwindowhwnd),
{
OSVERSIONINFOEX versionInfo;
bool hasMinVersionForTaskbar = false;
@ -1208,6 +1201,7 @@ static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
return ch;
}
#if 0 /* UNUSED */
/** Reverse the bits in a GHOST_TUns16 */
static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)
{
@ -1217,6 +1211,7 @@ static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)
shrt = ((shrt >> 8) & 0x00FF) | ((shrt << 8) & 0xFF00);
return shrt;
}
#endif
GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2],
GHOST_TUns8 mask[16][2],
int hotX, int hotY)

@ -236,7 +236,7 @@ public:
* Returns the name of the window class.
* \return The name of the window class.
*/
static wchar_t *getWindowClassName() {
static const wchar_t *getWindowClassName() {
return s_windowClassName;
}
@ -355,7 +355,7 @@ protected:
/** ITaskbarList3 structure for progress bar*/
ITaskbarList3 *m_Bar;
static wchar_t *s_windowClassName;
static const wchar_t *s_windowClassName;
static const int s_maxTitleLength;
/** WinTab dll handle */

@ -219,7 +219,9 @@ int conv_utf_8_to_16(const char *in8, wchar_t *out16, size_t size16)
return err;
}
int is_ascii(const char *in8)
/* UNUSED FUNCTIONS */
#if 0
static int is_ascii(const char *in8)
{
for (; *in8; in8++)
if (0x80 & *in8) return 0;
@ -227,7 +229,7 @@ int is_ascii(const char *in8)
return 1;
}
void utf_8_cut_end(char *inout8, size_t maxcutpoint)
static void utf_8_cut_end(char *inout8, size_t maxcutpoint)
{
char *cur = inout8 + maxcutpoint;
char cc;
@ -235,7 +237,7 @@ void utf_8_cut_end(char *inout8, size_t maxcutpoint)
cc = *cur;
}
#endif
char *alloc_utf_8_from_16(const wchar_t *in16, size_t add)

@ -589,11 +589,7 @@ static void switch_endian_bh8(BHead8 *bhead)
static void bh4_from_bh8(BHead *bhead, BHead8 *bhead8, int do_endian_swap)
{
BHead4 *bhead4 = (BHead4 *) bhead;
#if defined(WIN32) && !defined(FREE_WINDOWS)
__int64 old;
#else
long long old;
#endif
int64_t old;
bhead4->code = bhead8->code;
bhead4->len = bhead8->len;