IVideoDriver::setMaterialRendererName now using u32 for index like other similar functions

Other functions like getMaterialRendererName got switched to u32 in the past. I can see no reason why this one was left out, so changing it to be same as the rest.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6300 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2022-02-09 19:28:45 +00:00
parent 19b003a840
commit 3da5987f4b
3 changed files with 5 additions and 5 deletions

@ -1343,7 +1343,7 @@ namespace video
E_MATERIAL_TYPE enum or a value which was returned by
addMaterialRenderer().
\param name: New name of the material renderer. */
virtual void setMaterialRendererName(s32 idx, const c8* name) =0;
virtual void setMaterialRendererName(u32 idx, const c8* name) =0;
//! Swap the material renderers used for certain id's
/** Swap the IMaterialRenderers responsible for rendering specific

@ -2093,10 +2093,10 @@ s32 CNullDriver::addMaterialRenderer(IMaterialRenderer* renderer, const char* na
//! Sets the name of a material renderer.
void CNullDriver::setMaterialRendererName(s32 idx, const char* name)
void CNullDriver::setMaterialRendererName(u32 idx, const char* name)
{
if (idx < s32(sizeof(sBuiltInMaterialTypeNames) / sizeof(char*))-1 ||
idx >= (s32)MaterialRenderers.size())
if (idx < (sizeof(sBuiltInMaterialTypeNames) / sizeof(char*))-1 ||
idx >= MaterialRenderers.size())
return;
MaterialRenderers[idx].Name = name;

@ -613,7 +613,7 @@ namespace video
virtual bool writeImageToFile(IImage* image, io::IWriteFile * file, u32 param = 0) IRR_OVERRIDE;
//! Sets the name of a material renderer.
virtual void setMaterialRendererName(s32 idx, const char* name) IRR_OVERRIDE;
virtual void setMaterialRendererName(u32 idx, const char* name) IRR_OVERRIDE;
//! Swap the material renderers used for certain id's
virtual void swapMaterialRenderers(u32 idx1, u32 idx2, bool swapNames) IRR_OVERRIDE;