mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-28 00:47:31 +01:00
Avoid undefined arithmetic on nullptr in buffer_offset function
Not quite sure why it was done that way. Maybe to ensure we work with byte-pointers of correct size or something? Anyway, this doesn't seem to be defined in c++, so let's try working with a cast instead. Just something cppcheck tool complained about. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6447 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
9c2c91776e
commit
939b3f7bfb
@ -746,10 +746,10 @@ IRenderTarget* COpenGLDriver::addRenderTarget()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// small helper function to create vertex buffer object adress offsets
|
// small helper function to create vertex buffer object address offsets
|
||||||
static inline u8* buffer_offset(const long offset)
|
static inline const GLvoid * buffer_offset(const long offset)
|
||||||
{
|
{
|
||||||
return ((u8*)0 + offset);
|
return (const GLvoid *)offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user