Cleanup warnings and bugs found through static analysis
This commit is contained in:
@@ -95,12 +95,6 @@ bool KRTextureTGA::uploadTexture(GLenum target, int lod_max_dim, int ¤t_lo
|
||||
m_pData->lock();
|
||||
TGA_HEADER *pHeader = (TGA_HEADER *)m_pData->getStart();
|
||||
unsigned char *pData = (unsigned char *)pHeader + (long)pHeader->idlength + (long)pHeader->colourmaplength * (long)pHeader->colourmaptype + sizeof(TGA_HEADER);
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
GLenum base_internal_format = GL_BGRA;
|
||||
#else
|
||||
GLenum base_internal_format = pHeader->bitsperpixel == 24 ? GL_BGR : GL_BGRA;
|
||||
#endif
|
||||
|
||||
GLenum internal_format = GL_RGBA;
|
||||
|
||||
@@ -115,8 +109,6 @@ bool KRTextureTGA::uploadTexture(GLenum target, int lod_max_dim, int ¤t_lo
|
||||
return false; // Mapped colors not supported
|
||||
}
|
||||
|
||||
GLenum err;
|
||||
|
||||
switch(pHeader->imagetype) {
|
||||
case 2: // rgb
|
||||
switch(pHeader->bitsperpixel) {
|
||||
|
||||
Reference in New Issue
Block a user