diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 371a73f47e..8ff9b2b75e 100644 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -245,7 +245,7 @@ apply_texture(int i, TextureContext *tc, const SamplerState &sampler) { set_sampler_state(i, D3DSAMP_BORDERCOLOR, border_color); - uint aniso_degree = sampler.get_effective_anisotropic_degree(); + unsigned int aniso_degree = sampler.get_effective_anisotropic_degree(); SamplerState::FilterType ft = sampler.get_effective_magfilter(); if (aniso_degree >= 1) { diff --git a/panda/src/dxgsg9/dxTextureContext9.cxx b/panda/src/dxgsg9/dxTextureContext9.cxx index 19a094fc45..9aab3a1640 100644 --- a/panda/src/dxgsg9/dxTextureContext9.cxx +++ b/panda/src/dxgsg9/dxTextureContext9.cxx @@ -831,7 +831,7 @@ create_texture(DXScreenData &scrn) { tex->set_minfilter(ft); - uint aniso_degree; + unsigned int aniso_degree; aniso_degree = 1; if (scrn._d3dcaps.RasterCaps & D3DPRASTERCAPS_ANISOTROPY) { diff --git a/panda/src/dxgsg9/dxgsg9base.h b/panda/src/dxgsg9/dxgsg9base.h index 6782c4b2c7..1d26d98ec5 100644 --- a/panda/src/dxgsg9/dxgsg9base.h +++ b/panda/src/dxgsg9/dxgsg9base.h @@ -192,8 +192,8 @@ struct DXScreenData { HWND _window; HMONITOR _monitor; DWORD _max_available_video_memory; - ushort _card_id; // adapter ID - ushort _depth_buffer_bitdepth; //GetSurfaceDesc is not reliable so must store this explicitly + unsigned short _card_id; // adapter ID + unsigned short _depth_buffer_bitdepth; //GetSurfaceDesc is not reliable so must store this explicitly bool _can_direct_disable_color_writes; // if true, don't need blending for this bool _is_low_memory_card; bool _is_tnl_device; diff --git a/panda/src/express/pta_uchar.cxx b/panda/src/express/pta_uchar.cxx index 919eb2bc14..9f0e3dde30 100644 --- a/panda/src/express/pta_uchar.cxx +++ b/panda/src/express/pta_uchar.cxx @@ -13,7 +13,7 @@ #include "pta_uchar.h" -template class PointerToBase >; -template class PointerToArrayBase; +template class PointerToBase >; +template class PointerToArrayBase; template class PointerToArray; template class ConstPointerToArray; diff --git a/panda/src/express/pta_uchar.h b/panda/src/express/pta_uchar.h index 860e877042..38fb46a98b 100644 --- a/panda/src/express/pta_uchar.h +++ b/panda/src/express/pta_uchar.h @@ -29,8 +29,8 @@ #if !defined(__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ < 7 // GCC 4.6 has a weird bug related to this type. #else -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToBase >) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToArrayBase) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToBase >) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToArrayBase) EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToArray) EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, ConstPointerToArray) #endif diff --git a/panda/src/gobj/texture.I b/panda/src/gobj/texture.I index 6409ef8f26..8afced6cdb 100644 --- a/panda/src/gobj/texture.I +++ b/panda/src/gobj/texture.I @@ -2251,7 +2251,7 @@ do_get_auto_texture_scale(const CData *cdata) const { */ INLINE void Texture:: store_unscaled_byte(unsigned char *&p, int value) { - (*p++) = (uchar)value; + (*p++) = (unsigned char)value; } /** @@ -2262,10 +2262,10 @@ store_unscaled_byte(unsigned char *&p, int value) { INLINE void Texture:: store_unscaled_short(unsigned char *&p, int value) { union { - ushort us; - uchar uc[2]; + unsigned short us; + unsigned char uc[2]; } v; - v.us = (ushort)value; + v.us = (unsigned short)value; (*p++) = v.uc[0]; (*p++) = v.uc[1]; } @@ -2310,8 +2310,8 @@ get_unsigned_byte(const unsigned char *&p) { INLINE double Texture:: get_unsigned_short(const unsigned char *&p) { union { - ushort us; - uchar uc[2]; + unsigned short us; + unsigned char uc[2]; } v; v.uc[0] = (*p++); v.uc[1] = (*p++); @@ -2327,7 +2327,7 @@ INLINE double Texture:: get_unsigned_int(const unsigned char *&p) { union { unsigned int ui; - uchar uc[4]; + unsigned char uc[4]; } v; v.uc[0] = (*p++); v.uc[1] = (*p++); diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index d065d2dcd8..8dc41eec0f 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -1146,7 +1146,7 @@ set_ram_image_as(CPTA_uchar image, const string &supplied_format) { return; } for (int p = 0; p < imgsize; ++p) { - for (uchar s = 0; s < format.size(); ++s) { + for (unsigned char s = 0; s < format.size(); ++s) { signed char component = -1; if (format.at(s) == 'B' || (cdata->_num_components <= 2 && format.at(s) != 'A')) { component = 0; @@ -1178,7 +1178,7 @@ set_ram_image_as(CPTA_uchar image, const string &supplied_format) { return; } for (int p = 0; p < imgsize; ++p) { - for (uchar s = 0; s < format.size(); ++s) { + for (unsigned char s = 0; s < format.size(); ++s) { signed char component = -1; if (format.at(s) == 'B' || (cdata->_num_components <= 2 && format.at(s) != 'A')) { component = 0; @@ -8023,7 +8023,7 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size, for (int j = y_size-1; j >= 0; j--) { const xel *row = array + j * x_size; for (int i = 0; i < x_size; i++) { - *p++ = (uchar)PPM_GETB(row[i]); + *p++ = (unsigned char)PPM_GETB(row[i]); } p += row_skip; } @@ -8036,8 +8036,8 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size, const xel *row = array + j * x_size; const xelval *alpha_row = alpha + j * x_size; for (int i = 0; i < x_size; i++) { - *p++ = (uchar)PPM_GETB(row[i]); - *p++ = (uchar)alpha_row[i]; + *p++ = (unsigned char)PPM_GETB(row[i]); + *p++ = (unsigned char)alpha_row[i]; } p += row_skip; } @@ -8045,8 +8045,8 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size, for (int j = y_size-1; j >= 0; j--) { const xel *row = array + j * x_size; for (int i = 0; i < x_size; i++) { - *p++ = (uchar)PPM_GETB(row[i]); - *p++ = (uchar)255; + *p++ = (unsigned char)PPM_GETB(row[i]); + *p++ = (unsigned char)255; } p += row_skip; } @@ -8057,9 +8057,9 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size, for (int j = y_size-1; j >= 0; j--) { const xel *row = array + j * x_size; for (int i = 0; i < x_size; i++) { - *p++ = (uchar)PPM_GETB(row[i]); - *p++ = (uchar)PPM_GETG(row[i]); - *p++ = (uchar)PPM_GETR(row[i]); + *p++ = (unsigned char)PPM_GETB(row[i]); + *p++ = (unsigned char)PPM_GETG(row[i]); + *p++ = (unsigned char)PPM_GETR(row[i]); } p += row_skip; } @@ -8072,10 +8072,10 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size, const xel *row = array + j * x_size; const xelval *alpha_row = alpha + j * x_size; for (int i = 0; i < x_size; i++) { - *p++ = (uchar)PPM_GETB(row[i]); - *p++ = (uchar)PPM_GETG(row[i]); - *p++ = (uchar)PPM_GETR(row[i]); - *p++ = (uchar)alpha_row[i]; + *p++ = (unsigned char)PPM_GETB(row[i]); + *p++ = (unsigned char)PPM_GETG(row[i]); + *p++ = (unsigned char)PPM_GETR(row[i]); + *p++ = (unsigned char)alpha_row[i]; } p += row_skip; } @@ -8083,10 +8083,10 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size, for (int j = y_size-1; j >= 0; j--) { const xel *row = array + j * x_size; for (int i = 0; i < x_size; i++) { - *p++ = (uchar)PPM_GETB(row[i]); - *p++ = (uchar)PPM_GETG(row[i]); - *p++ = (uchar)PPM_GETR(row[i]); - *p++ = (uchar)255; + *p++ = (unsigned char)PPM_GETB(row[i]); + *p++ = (unsigned char)PPM_GETG(row[i]); + *p++ = (unsigned char)PPM_GETR(row[i]); + *p++ = (unsigned char)255; } p += row_skip; } diff --git a/panda/src/putil/clockObject.I b/panda/src/putil/clockObject.I index b2cb2975d1..bf355cf736 100644 --- a/panda/src/putil/clockObject.I +++ b/panda/src/putil/clockObject.I @@ -242,7 +242,7 @@ TimeVal() { /** * */ -INLINE ulong TimeVal:: +INLINE unsigned long TimeVal:: get_sec() const { return tv[0]; } @@ -250,7 +250,7 @@ get_sec() const { /** * */ -INLINE ulong TimeVal:: +INLINE unsigned long TimeVal:: get_usec() const { return tv[1]; } diff --git a/panda/src/putil/clockObject.h b/panda/src/putil/clockObject.h index 4e06ec2554..4f2c93cfa5 100644 --- a/panda/src/putil/clockObject.h +++ b/panda/src/putil/clockObject.h @@ -31,9 +31,9 @@ class EXPCL_PANDA_PUTIL TimeVal { PUBLISHED: INLINE TimeVal(); - INLINE ulong get_sec() const; - INLINE ulong get_usec() const; - ulong tv[2]; + INLINE unsigned long get_sec() const; + INLINE unsigned long get_usec() const; + unsigned long tv[2]; }; /** diff --git a/panda/src/putil/config_putil.N b/panda/src/putil/config_putil.N index 4c3e2086d8..90fadcd25e 100644 --- a/panda/src/putil/config_putil.N +++ b/panda/src/putil/config_putil.N @@ -10,10 +10,10 @@ ignoretype Factory # builds (to support multi-arch builds), so we don't export this. ignoretype BitMaskNative -forcetype PointerToBase > -forcetype PointerToArrayBase -forcetype PointerToArray -forcetype ConstPointerToArray +forcetype PointerToBase > +forcetype PointerToArrayBase +forcetype PointerToArray +forcetype ConstPointerToArray # This is so the extensions for PTA_ushort are made available. forceinclude "pointerToArray_ext.h" diff --git a/panda/src/putil/pta_ushort.cxx b/panda/src/putil/pta_ushort.cxx index 6163184397..4a8526b57c 100644 --- a/panda/src/putil/pta_ushort.cxx +++ b/panda/src/putil/pta_ushort.cxx @@ -13,7 +13,7 @@ #include "pta_ushort.h" -template class PointerToBase >; -template class PointerToArrayBase; +template class PointerToBase >; +template class PointerToArrayBase; template class PointerToArray; template class ConstPointerToArray; diff --git a/panda/src/putil/pta_ushort.h b/panda/src/putil/pta_ushort.h index 6424ddb237..75af379125 100644 --- a/panda/src/putil/pta_ushort.h +++ b/panda/src/putil/pta_ushort.h @@ -26,8 +26,8 @@ * defining the pta again. */ -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToBase >) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToArrayBase) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToBase >) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToArrayBase) EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToArray) EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ConstPointerToArray) diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index 1cb4e8f3d1..5f5ee99542 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -2109,7 +2109,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { if (lptstr != nullptr) { char *pChar; for (pChar = lptstr; *pChar; pChar++) { - _input->keystroke((uchar)*pChar); + _input->keystroke((unsigned char)*pChar); } GlobalUnlock(hglb); } diff --git a/pandatool/src/mayaegg/mayaEggLoader.cxx b/pandatool/src/mayaegg/mayaEggLoader.cxx index a6ec611d7a..200154bdc5 100644 --- a/pandatool/src/mayaegg/mayaEggLoader.cxx +++ b/pandatool/src/mayaegg/mayaEggLoader.cxx @@ -1466,8 +1466,8 @@ void MayaEggLoader::TraverseEggNode(EggNode *node, EggGroup *context, string del surface->_vNumCvs = eggNurbsSurface->get_num_v_cvs(); // [gjeon] building cvArray - for (uint ui = 0; ui < surface->_uNumCvs; ui++) { - for (uint vi = 0; vi < surface->_vNumCvs; vi++) { + for (unsigned int ui = 0; ui < surface->_uNumCvs; ui++) { + for (unsigned int vi = 0; vi < surface->_vNumCvs; vi++) { EggVertex *vtx = eggNurbsSurface->get_vertex(eggNurbsSurface->get_vertex_index(ui, vi)); surface->_cvArray.append(MakeMPoint(vtx->get_pos3())); } diff --git a/pandatool/src/mayaegg/mayaNodeTree.cxx b/pandatool/src/mayaegg/mayaNodeTree.cxx index 8b12dea910..977fec2925 100644 --- a/pandatool/src/mayaegg/mayaNodeTree.cxx +++ b/pandatool/src/mayaegg/mayaNodeTree.cxx @@ -371,7 +371,7 @@ get_egg_group(MayaNodeDesc *node_desc) { pvector tag_attribute_names; get_tag_attribute_names(dag_object, tag_attribute_names); - for (uint ti=0; ti < tag_attribute_names.size(); ti++) { + for (unsigned int ti=0; ti < tag_attribute_names.size(); ti++) { if (get_enum_attribute(dag_object, tag_attribute_names[ti], object_type)) { egg_group->set_tag(tag_attribute_names[ti].substr(3), object_type); }