Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-15 08:57:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-15 08:57:51 +0400
commitabce099804046237034c671d528005364aff0d72 (patch)
tree5991f46cc488b513d994668086da9106c53273ab /intern
parentf9d9459e3f86a662364a08b473a8f0faa46db5a6 (diff)
code cleanup: quiet some windows warnings.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowCarbon.cpp2
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp29
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.h4
-rw-r--r--intern/utfconv/utfconv.c8
4 files changed, 20 insertions, 23 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp
index c7be02cc7af..99d8854667e 100644
--- a/intern/ghost/intern/GHOST_WindowCarbon.cpp
+++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp
@@ -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)
{
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 0e8ff438998..98c574e89ea 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -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)
diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h
index 3f52f9e22b0..9e4377b8225 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.h
+++ b/intern/ghost/intern/GHOST_WindowWin32.h
@@ -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 */
diff --git a/intern/utfconv/utfconv.c b/intern/utfconv/utfconv.c
index a9b2920111d..7f7a612528d 100644
--- a/intern/utfconv/utfconv.c
+++ b/intern/utfconv/utfconv.c
@@ -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)