mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Fix assorted compiler warnings
This commit is contained in:
parent
0281f306e1
commit
588d41ed7e
@ -708,7 +708,7 @@ handle_update_field() {
|
||||
Py_DECREF(dclass_obj);
|
||||
nassertr(dclass_this != NULL, false);
|
||||
|
||||
DCClass *dclass = (DCClass *)PyLong_AsLong(dclass_this);
|
||||
DCClass *dclass = (DCClass *)PyLong_AsVoidPtr(dclass_this);
|
||||
Py_DECREF(dclass_this);
|
||||
|
||||
// If in quiet zone mode, throw update away unless distobj has
|
||||
@ -799,7 +799,7 @@ handle_update_field_owner() {
|
||||
Py_DECREF(dclass_obj);
|
||||
nassertr(dclass_this != NULL, false);
|
||||
|
||||
DCClass *dclass = (DCClass *)PyLong_AsLong(dclass_this);
|
||||
DCClass *dclass = (DCClass *)PyLong_AsVoidPtr(dclass_this);
|
||||
Py_DECREF(dclass_this);
|
||||
|
||||
// check if we should forward this update to the owner view
|
||||
@ -841,7 +841,7 @@ handle_update_field_owner() {
|
||||
Py_DECREF(dclass_obj);
|
||||
nassertr(dclass_this != NULL, false);
|
||||
|
||||
DCClass *dclass = (DCClass *)PyLong_AsLong(dclass_this);
|
||||
DCClass *dclass = (DCClass *)PyLong_AsVoidPtr(dclass_this);
|
||||
Py_DECREF(dclass_this);
|
||||
|
||||
// check if we should forward this update to the owner view
|
||||
@ -974,7 +974,7 @@ describe_message(ostream &out, const string &prefix,
|
||||
Py_DECREF(dclass_obj);
|
||||
nassertv(dclass_this != NULL);
|
||||
|
||||
dclass = (DCClass *)PyLong_AsLong(dclass_this);
|
||||
dclass = (DCClass *)PyLong_AsVoidPtr(dclass_this);
|
||||
Py_DECREF(dclass_this);
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ get_graphics_window() const {
|
||||
/**
|
||||
* Returns the Windows proc hwnd parameter.
|
||||
*/
|
||||
INLINE int GraphicsWindowProcCallbackData::
|
||||
INLINE uintptr_t GraphicsWindowProcCallbackData::
|
||||
get_hwnd() const {
|
||||
return _hwnd;
|
||||
}
|
||||
@ -65,7 +65,7 @@ get_lparam() const {
|
||||
* Sets the Windows proc hwnd parameter.
|
||||
*/
|
||||
INLINE void GraphicsWindowProcCallbackData::
|
||||
set_hwnd(int hwnd) {
|
||||
set_hwnd(uintptr_t hwnd) {
|
||||
_hwnd = hwnd;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
INLINE GraphicsWindow* get_graphics_window() const;
|
||||
|
||||
#ifdef WIN32
|
||||
INLINE void set_hwnd(int hwnd);
|
||||
INLINE void set_hwnd(uintptr_t hwnd);
|
||||
INLINE void set_msg(int msg);
|
||||
INLINE void set_wparam(int wparam);
|
||||
INLINE void set_lparam(int lparam);
|
||||
@ -42,7 +42,7 @@ PUBLISHED:
|
||||
virtual void output(ostream &out) const;
|
||||
|
||||
#ifdef WIN32
|
||||
INLINE int get_hwnd() const;
|
||||
INLINE uintptr_t get_hwnd() const;
|
||||
INLINE int get_msg() const;
|
||||
INLINE int get_wparam() const;
|
||||
INLINE int get_lparam() const;
|
||||
@ -55,7 +55,7 @@ PUBLISHED:
|
||||
private:
|
||||
GraphicsWindow* _graphicsWindow;
|
||||
#ifdef WIN32
|
||||
int _hwnd;
|
||||
uintptr_t _hwnd;
|
||||
int _msg;
|
||||
int _wparam;
|
||||
int _lparam;
|
||||
|
@ -47,7 +47,7 @@ PythonGraphicsWindowProc::
|
||||
LONG PythonGraphicsWindowProc::
|
||||
wnd_proc(GraphicsWindow* graphicsWindow, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam){
|
||||
GraphicsWindowProcCallbackData cdata(graphicsWindow);
|
||||
cdata.set_hwnd((int)hwnd);
|
||||
cdata.set_hwnd((uintptr_t)hwnd);
|
||||
cdata.set_msg(msg);
|
||||
cdata.set_wparam(wparam);
|
||||
cdata.set_lparam(lparam);
|
||||
|
@ -127,7 +127,7 @@ get_safe_buffer_start() {
|
||||
// buffer, and then pointing to the first multiple of 0x10000 within that
|
||||
// buffer.
|
||||
_temp_buffer = new unsigned char[0x1ffff];
|
||||
_safe_buffer_start = (unsigned char *)(((long)_temp_buffer + 0xffff) & ~0xffff);
|
||||
_safe_buffer_start = (unsigned char *)(((uintptr_t)_temp_buffer + 0xffff) & ~0xffff);
|
||||
}
|
||||
|
||||
return _safe_buffer_start;
|
||||
|
@ -4936,7 +4936,7 @@ draw_primitive_up(D3DPRIMITIVETYPE primitive_type,
|
||||
_d3d_device->DrawPrimitiveUP(primitive_type, primitive_count,
|
||||
buffer_start, stride);
|
||||
|
||||
} else if ((((long)buffer_end ^ (long)buffer_start) & ~0xffff) == 0) {
|
||||
} else if ((((uintptr_t)buffer_end ^ (uintptr_t)buffer_start) & ~0xffff) == 0) {
|
||||
// No problem; we can draw the buffer directly.
|
||||
_d3d_device->DrawPrimitiveUP(primitive_type, primitive_count,
|
||||
buffer_start, stride);
|
||||
@ -4978,7 +4978,7 @@ draw_indexed_primitive_up(D3DPRIMITIVETYPE primitive_type,
|
||||
(primitive_type, min_index, max_index - min_index + 1, num_primitives,
|
||||
index_data, index_type, buffer, stride);
|
||||
|
||||
} else if ((((long)buffer_end ^ (long)buffer_start) & ~0xffff) == 0) {
|
||||
} else if ((((uintptr_t)buffer_end ^ (uintptr_t)buffer_start) & ~0xffff) == 0) {
|
||||
// No problem; we can draw the buffer directly.
|
||||
_d3d_device->DrawIndexedPrimitiveUP
|
||||
(primitive_type, min_index, max_index - min_index + 1, num_primitives,
|
||||
|
@ -680,7 +680,7 @@ create_texture(DXScreenData &scrn) {
|
||||
<< "NumColorChannels: " << num_color_channels << "; NumAlphaBits: "
|
||||
<< num_alpha_bits << "; targetbpp: " <<target_bpp
|
||||
<< "; _supported_tex_formats_mask: 0x"
|
||||
<< (void*)scrn._supported_tex_formats_mask
|
||||
<< hex << scrn._supported_tex_formats_mask << dec
|
||||
<< "; NeedLuminance: " << needs_luminance << endl;
|
||||
goto error_exit;
|
||||
|
||||
|
@ -880,10 +880,10 @@ choose_device() {
|
||||
<< ", Driver: " << adapter_info.Driver << ", DriverVersion: ("
|
||||
<< HIWORD(DrvVer->HighPart) << "." << LOWORD(DrvVer->HighPart) << "."
|
||||
<< HIWORD(DrvVer->LowPart) << "." << LOWORD(DrvVer->LowPart)
|
||||
<< ")\nVendorID: 0x" << (void*) adapter_info.VendorId
|
||||
<< " DeviceID: 0x" << (void*) adapter_info.DeviceId
|
||||
<< " SubsysID: 0x" << (void*) adapter_info.SubSysId
|
||||
<< " Revision: 0x" << (void*) adapter_info.Revision << endl;
|
||||
<< ")\nVendorID: 0x" << hex << adapter_info.VendorId
|
||||
<< " DeviceID: 0x" << adapter_info.DeviceId
|
||||
<< " SubsysID: 0x" << adapter_info.SubSysId
|
||||
<< " Revision: 0x" << adapter_info.Revision << dec << endl;
|
||||
|
||||
HMONITOR _monitor = dxpipe->__d3d9->GetAdapterMonitor(i);
|
||||
if (_monitor == NULL) {
|
||||
|
@ -185,10 +185,10 @@ public:
|
||||
register_type(_type_handle, "AsyncGatheringFuture",
|
||||
AsyncFuture::get_class_type());
|
||||
}
|
||||
virtual TypeHandle get_type() const {
|
||||
virtual TypeHandle get_type() const override {
|
||||
return get_class_type();
|
||||
}
|
||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||
virtual TypeHandle force_init_type() override {init_type(); return get_class_type();}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "config_movies.h"
|
||||
|
||||
#define DR_FLAC_IMPLEMENTATION
|
||||
#define DR_FLAC_NO_STDIO
|
||||
extern "C" {
|
||||
#include "dr_flac.h"
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ print_pfd(PIXELFORMATDESCRIPTOR *pfd, char *msg) {
|
||||
|
||||
wgldisplay_cat.debug()
|
||||
<< msg << ", " << OGLDrvStrings[drvtype] << " driver\n"
|
||||
<< "PFD flags: 0x" << (void*)pfd->dwFlags << " ("
|
||||
<< "PFD flags: 0x" << hex << pfd->dwFlags << dec << " ("
|
||||
<< PRINT_FLAG(GENERIC_ACCELERATED)
|
||||
<< PRINT_FLAG(GENERIC_FORMAT)
|
||||
<< PRINT_FLAG(DOUBLEBUFFER)
|
||||
|
Loading…
x
Reference in New Issue
Block a user