diff --git a/include/IVideoDriver.h b/include/IVideoDriver.h index aef4820c..9c4d84c4 100644 --- a/include/IVideoDriver.h +++ b/include/IVideoDriver.h @@ -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 diff --git a/source/Irrlicht/CNullDriver.cpp b/source/Irrlicht/CNullDriver.cpp index cd02b3c5..069b2cc2 100644 --- a/source/Irrlicht/CNullDriver.cpp +++ b/source/Irrlicht/CNullDriver.cpp @@ -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; diff --git a/source/Irrlicht/CNullDriver.h b/source/Irrlicht/CNullDriver.h index 711a49ac..33c96e60 100644 --- a/source/Irrlicht/CNullDriver.h +++ b/source/Irrlicht/CNullDriver.h @@ -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;