mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Fix some aliasing warnings
This commit is contained in:
parent
74190f9e50
commit
bff070430e
@ -36,7 +36,7 @@ int main(int argc, char *mb_argv[]) {
|
|||||||
size_t len = mbstowcs(NULL, mb_argv[i], 0);
|
size_t len = mbstowcs(NULL, mb_argv[i], 0);
|
||||||
argv[i] = new wchar_t[len + 1];
|
argv[i] = new wchar_t[len + 1];
|
||||||
mbstowcs(argv[i], mb_argv[i], len);
|
mbstowcs(argv[i], mb_argv[i], len);
|
||||||
argv[i][len] = NULL;
|
argv[i][len] = 0;
|
||||||
}
|
}
|
||||||
// Just for good measure
|
// Just for good measure
|
||||||
argv[argc] = NULL;
|
argv[argc] = NULL;
|
||||||
|
@ -1398,9 +1398,9 @@ modify_ends() {
|
|||||||
// you do, be sure you know what you are doing!
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void GeomPrimitive::
|
void GeomPrimitive::
|
||||||
set_ends(CPTA_int ends) {
|
set_ends(PTA_int ends) {
|
||||||
CDWriter cdata(_cycler, true);
|
CDWriter cdata(_cycler, true);
|
||||||
cdata->_ends = (PTA_int &)ends;
|
cdata->_ends = ends;
|
||||||
|
|
||||||
cdata->_modified = Geom::get_next_modified();
|
cdata->_modified = Geom::get_next_modified();
|
||||||
cdata->_got_minmax = false;
|
cdata->_got_minmax = false;
|
||||||
|
@ -169,7 +169,7 @@ PUBLISHED:
|
|||||||
|
|
||||||
INLINE CPTA_int get_ends() const;
|
INLINE CPTA_int get_ends() const;
|
||||||
PTA_int modify_ends();
|
PTA_int modify_ends();
|
||||||
void set_ends(CPTA_int ends);
|
void set_ends(PTA_int ends);
|
||||||
|
|
||||||
INLINE CPT(GeomVertexArrayData) get_mins() const;
|
INLINE CPT(GeomVertexArrayData) get_mins() const;
|
||||||
INLINE CPT(GeomVertexArrayData) get_maxs() const;
|
INLINE CPT(GeomVertexArrayData) get_maxs() const;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
// type.
|
// type.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE Filename Shader::
|
INLINE Filename Shader::
|
||||||
get_filename(const ShaderType &type) const {
|
get_filename(ShaderType type) const {
|
||||||
if (_filename._separate && type != ST_none) {
|
if (_filename._separate && type != ST_none) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ST_vertex:
|
case ST_vertex:
|
||||||
@ -59,7 +59,7 @@ get_filename(const ShaderType &type) const {
|
|||||||
// Description: Return the Shader's text for the given shader type.
|
// Description: Return the Shader's text for the given shader type.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE const string &Shader::
|
INLINE const string &Shader::
|
||||||
get_text(const ShaderType &type) const {
|
get_text(ShaderType type) const {
|
||||||
if (_text._separate) {
|
if (_text._separate) {
|
||||||
nassertr(type != ST_none || !_text._shared.empty(), _text._shared);
|
nassertr(type != ST_none || !_text._shared.empty(), _text._shared);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -97,8 +97,8 @@ PUBLISHED:
|
|||||||
const string &tess_evaluation = "");
|
const string &tess_evaluation = "");
|
||||||
static PT(Shader) make_compute(ShaderLanguage lang, const string &body);
|
static PT(Shader) make_compute(ShaderLanguage lang, const string &body);
|
||||||
|
|
||||||
INLINE Filename get_filename(const ShaderType &type = ST_none) const;
|
INLINE Filename get_filename(ShaderType type = ST_none) const;
|
||||||
INLINE const string &get_text(const ShaderType &type = ST_none) const;
|
INLINE const string &get_text(ShaderType type = ST_none) const;
|
||||||
INLINE bool get_error_flag() const;
|
INLINE bool get_error_flag() const;
|
||||||
INLINE ShaderLanguage get_language() const;
|
INLINE ShaderLanguage get_language() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user