diff --git a/direct/src/directbase/ppython.cxx b/direct/src/directbase/ppython.cxx index 4d673d96b6..65f1272c8a 100644 --- a/direct/src/directbase/ppython.cxx +++ b/direct/src/directbase/ppython.cxx @@ -36,7 +36,7 @@ int main(int argc, char *mb_argv[]) { size_t len = mbstowcs(NULL, mb_argv[i], 0); argv[i] = new wchar_t[len + 1]; mbstowcs(argv[i], mb_argv[i], len); - argv[i][len] = NULL; + argv[i][len] = 0; } // Just for good measure argv[argc] = NULL; diff --git a/panda/src/gobj/geomPrimitive.cxx b/panda/src/gobj/geomPrimitive.cxx index 80408a18c5..797ea9e1c8 100644 --- a/panda/src/gobj/geomPrimitive.cxx +++ b/panda/src/gobj/geomPrimitive.cxx @@ -1398,9 +1398,9 @@ modify_ends() { // you do, be sure you know what you are doing! //////////////////////////////////////////////////////////////////// void GeomPrimitive:: -set_ends(CPTA_int ends) { +set_ends(PTA_int ends) { CDWriter cdata(_cycler, true); - cdata->_ends = (PTA_int &)ends; + cdata->_ends = ends; cdata->_modified = Geom::get_next_modified(); cdata->_got_minmax = false; diff --git a/panda/src/gobj/geomPrimitive.h b/panda/src/gobj/geomPrimitive.h index da787edad7..d2a2f4cbd1 100644 --- a/panda/src/gobj/geomPrimitive.h +++ b/panda/src/gobj/geomPrimitive.h @@ -169,7 +169,7 @@ PUBLISHED: INLINE CPTA_int get_ends() const; 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_maxs() const; diff --git a/panda/src/gobj/shader.I b/panda/src/gobj/shader.I index eccb05d79f..0dae6344dd 100644 --- a/panda/src/gobj/shader.I +++ b/panda/src/gobj/shader.I @@ -20,7 +20,7 @@ // type. //////////////////////////////////////////////////////////////////// INLINE Filename Shader:: -get_filename(const ShaderType &type) const { +get_filename(ShaderType type) const { if (_filename._separate && type != ST_none) { switch (type) { case ST_vertex: @@ -59,7 +59,7 @@ get_filename(const ShaderType &type) const { // Description: Return the Shader's text for the given shader type. //////////////////////////////////////////////////////////////////// INLINE const string &Shader:: -get_text(const ShaderType &type) const { +get_text(ShaderType type) const { if (_text._separate) { nassertr(type != ST_none || !_text._shared.empty(), _text._shared); switch (type) { diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index 0c2fb79401..c0c31afaae 100644 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -97,8 +97,8 @@ PUBLISHED: const string &tess_evaluation = ""); static PT(Shader) make_compute(ShaderLanguage lang, const string &body); - INLINE Filename get_filename(const ShaderType &type = ST_none) const; - INLINE const string &get_text(const ShaderType &type = ST_none) const; + INLINE Filename get_filename(ShaderType type = ST_none) const; + INLINE const string &get_text(ShaderType type = ST_none) const; INLINE bool get_error_flag() const; INLINE ShaderLanguage get_language() const;