From bc596797a30c5a94c3d0f5a21e0fe55823cf6877 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 10 Jun 2018 01:38:43 -0600 Subject: [PATCH] general: Resolve some warnings unique to Windows --- dtool/src/prc/configPageManager.cxx | 1 + panda/src/chan/animChannel.I | 15 --------------- panda/src/express/checksumHashGenerator.I | 6 ++++++ panda/src/wgldisplay/wglGraphicsPipe.cxx | 2 -- panda/src/wgldisplay/wglGraphicsWindow.cxx | 2 +- panda/src/windisplay/winGraphicsPipe.cxx | 1 - 6 files changed, 8 insertions(+), 19 deletions(-) diff --git a/dtool/src/prc/configPageManager.cxx b/dtool/src/prc/configPageManager.cxx index 8065ac3261..fafaa6fa07 100644 --- a/dtool/src/prc/configPageManager.cxx +++ b/dtool/src/prc/configPageManager.cxx @@ -13,6 +13,7 @@ #include "configPageManager.h" #include "configDeclaration.h" +#include "configVariableBool.h" #include "configVariableString.h" #include "configPage.h" #include "prcKeyRegistry.h" diff --git a/panda/src/chan/animChannel.I b/panda/src/chan/animChannel.I index 412f21c684..921536f0b3 100644 --- a/panda/src/chan/animChannel.I +++ b/panda/src/chan/animChannel.I @@ -60,21 +60,6 @@ INLINE AnimChannel:: ~AnimChannel() { } -#if defined(WIN32_VC) || defined(WIN64_VC) -/** - * Gets the value of the channel at the indicated frame. This is a pure - * virtual function and normally would not need a function body, except that - * VC++ seems to be unhappy about instantiating the template without it. - * - * However, GCC seems to get confused when it *is* defined. So this whole - * thing is protected within an ifdef. - */ -template -void AnimChannel:: -get_value(int, typename AnimChannel::ValueType &) { -} -#endif - /** * Returns the value associated with the current frame, with no scale or share * components. This only makes sense for a matrix-type channel, although for diff --git a/panda/src/express/checksumHashGenerator.I b/panda/src/express/checksumHashGenerator.I index a2e9920203..ade42717b0 100644 --- a/panda/src/express/checksumHashGenerator.I +++ b/panda/src/express/checksumHashGenerator.I @@ -11,6 +11,12 @@ * @date 2001-05-14 */ +#ifdef _WIN32 +// Needed for PtrToLong, below +#define WIN32_LEAN_AND_MEAN 1 +#include +#endif + /** * Adds another integer to the hash so far. This function should be * overridden in base classes; this is the principle implementation of the diff --git a/panda/src/wgldisplay/wglGraphicsPipe.cxx b/panda/src/wgldisplay/wglGraphicsPipe.cxx index 890c34e19c..abffe1e1ee 100644 --- a/panda/src/wgldisplay/wglGraphicsPipe.cxx +++ b/panda/src/wgldisplay/wglGraphicsPipe.cxx @@ -18,8 +18,6 @@ #include "wglGraphicsBuffer.h" #include "wglGraphicsStateGuardian.h" -typedef enum {Software, MCD, ICD} OGLDriverType; - TypeHandle wglGraphicsPipe::_type_handle; bool wglGraphicsPipe::_current_valid; HDC wglGraphicsPipe::_current_hdc; diff --git a/panda/src/wgldisplay/wglGraphicsWindow.cxx b/panda/src/wgldisplay/wglGraphicsWindow.cxx index a0cfb1a785..fcba0b8bf4 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.cxx +++ b/panda/src/wgldisplay/wglGraphicsWindow.cxx @@ -357,7 +357,7 @@ setup_colormap(const PIXELFORMATDESCRIPTOR &pixelformat) { #ifdef NOTIFY_DEBUG -// typedef enum {Software, MCD, ICD} OGLDriverType; +typedef enum {Software, MCD, ICD} OGLDriverType; static const char *OGLDrvStrings[3] = {"Software","MCD","ICD"}; /** diff --git a/panda/src/windisplay/winGraphicsPipe.cxx b/panda/src/windisplay/winGraphicsPipe.cxx index 973567a4aa..6f19ca2f14 100644 --- a/panda/src/windisplay/winGraphicsPipe.cxx +++ b/panda/src/windisplay/winGraphicsPipe.cxx @@ -48,7 +48,6 @@ typedef long (__stdcall *CallNtPowerInformationType) (POWER_INFORMATION_LEVEL in static int initialize = false; static HMODULE psapi_dll = 0; -static HMODULE power_dll = 0; static GetProcessMemoryInfoType GetProcessMemoryInfoFunction = 0; static CallNtPowerInformationType CallNtPowerInformationFunction = 0;