From a26fbc74f091270bd127cea737d4135074de94d1 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 1 Jun 2014 10:27:16 +0300 Subject: [PATCH] Fix compilation errors in latest texture-related changes GCC and Clang complain about non-POD type passed to variadic function. --- src/gl/dynlights/a_dynlight.cpp | 2 +- src/gl/shaders/gl_shader.cpp | 2 +- src/gl/textures/gl_hirestex.cpp | 4 ++-- src/gl/textures/gl_material.cpp | 2 +- src/gl/textures/gl_skyboxtexture.cpp | 6 +++--- src/gl/textures/gl_texture.cpp | 10 +++++----- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/gl/dynlights/a_dynlight.cpp b/src/gl/dynlights/a_dynlight.cpp index bc12288cd..a123f34fc 100644 --- a/src/gl/dynlights/a_dynlight.cpp +++ b/src/gl/dynlights/a_dynlight.cpp @@ -689,7 +689,7 @@ CCMD(listlights) if (dl->target) { FTextureID spr = gl_GetSpriteFrame(dl->target->sprite, dl->target->frame, 0, 0, NULL); - Printf(", frame = %s ", TexMan[spr]->Name); + Printf(", frame = %s ", TexMan[spr]->Name.GetChars()); } diff --git a/src/gl/shaders/gl_shader.cpp b/src/gl/shaders/gl_shader.cpp index ca1921bd4..7ac44f661 100644 --- a/src/gl/shaders/gl_shader.cpp +++ b/src/gl/shaders/gl_shader.cpp @@ -689,7 +689,7 @@ void gl_ParseHardwareShader(FScanner &sc, int deflump) { if (tex->bWarped != 0) { - Printf("Cannot combine warping with hardware shader on texture '%s'\n", tex->Name); + Printf("Cannot combine warping with hardware shader on texture '%s'\n", tex->Name.GetChars()); return; } tex->gl_info.shaderspeed = speed; diff --git a/src/gl/textures/gl_hirestex.cpp b/src/gl/textures/gl_hirestex.cpp index b7824bf11..e3d115c4e 100644 --- a/src/gl/textures/gl_hirestex.cpp +++ b/src/gl/textures/gl_hirestex.cpp @@ -177,7 +177,7 @@ int CheckDDPK3(FTexture *tex) for (const char ** extp=extensions; *extp; extp++) { - checkName.Format(*checklist, tex->Name, *extp); + checkName.Format(*checklist, tex->Name.GetChars(), *extp); int lumpnum = Wads.CheckNumForFullName(checkName); if (lumpnum >= 0) return lumpnum; } @@ -358,7 +358,7 @@ int CheckExternalFile(FTexture *tex, bool & hascolorkey) for (const char ** extp=extensions; *extp; extp++) { - checkName.Format(*checklist, progdir.GetChars(), tex->Name, *extp); + checkName.Format(*checklist, progdir.GetChars(), tex->Name.GetChars(), *extp); if (_access(checkName, 0) == 0) { hascolorkey = !!strstr(checkName, "-ck."); diff --git a/src/gl/textures/gl_material.cpp b/src/gl/textures/gl_material.cpp index f27e1bed9..5e9a9be1a 100644 --- a/src/gl/textures/gl_material.cpp +++ b/src/gl/textures/gl_material.cpp @@ -1092,7 +1092,7 @@ int FGLTexture::Dump(int i) { int cnt = 0; int lump = tex->GetSourceLump(); - Printf(PRINT_LOG, "Texture '%s' (Index %d, Lump %d, Name '%s'):\n", tex->Name, i, lump, Wads.GetLumpFullName(lump)); + Printf(PRINT_LOG, "Texture '%s' (Index %d, Lump %d, Name '%s'):\n", tex->Name.GetChars(), i, lump, Wads.GetLumpFullName(lump)); if (hirestexture) Printf(PRINT_LOG, "\tHirestexture\n"); if (glpatch) Printf(PRINT_LOG, "\tPatch\n"),cnt++; if (gltexture[0]) Printf(PRINT_LOG, "\tTexture (x:no, y:no )\n"),cnt++; diff --git a/src/gl/textures/gl_skyboxtexture.cpp b/src/gl/textures/gl_skyboxtexture.cpp index c004a4489..658eb2004 100644 --- a/src/gl/textures/gl_skyboxtexture.cpp +++ b/src/gl/textures/gl_skyboxtexture.cpp @@ -168,7 +168,7 @@ void gl_ParseSkybox(FScanner &sc) } if (facecount != 3 && facecount != 6) { - sc.ScriptError("%s: Skybox definition requires either 3 or 6 faces", sb->Name); + sc.ScriptError("%s: Skybox definition requires either 3 or 6 faces", sb->Name.GetChars()); } sb->SetSize(); TexMan.AddTexture(sb); @@ -209,7 +209,7 @@ void gl_ParseVavoomSkybox() FTexture *tex = TexMan.FindTexture(sc.String, FTexture::TEX_Wall, FTextureManager::TEXMAN_TryAny); if (tex != NULL) { - Printf("Texture '%s' not found in Vavoom skybox '%s'\n", sc.String, sb->Name); + Printf("Texture '%s' not found in Vavoom skybox '%s'\n", sc.String, sb->Name.GetChars()); } sb->faces[facecount] = tex; sc.MustGetStringName("}"); @@ -218,7 +218,7 @@ void gl_ParseVavoomSkybox() } if (facecount != 6) { - sc.ScriptError("%s: Skybox definition requires 6 faces", sb->Name); + sc.ScriptError("%s: Skybox definition requires 6 faces", sb->Name.GetChars()); } sb->SetSize(); TexMan.AddTexture(sb); diff --git a/src/gl/textures/gl_texture.cpp b/src/gl/textures/gl_texture.cpp index c4ead8b87..4f6e999f2 100644 --- a/src/gl/textures/gl_texture.cpp +++ b/src/gl/textures/gl_texture.cpp @@ -294,7 +294,7 @@ void FTexture::CreateDefaultBrightmap() if (GlobalBrightmap.Remap[texbuf[i]] == white) { // Create a brightmap - DPrintf("brightmap created for texture '%s'\n", Name); + DPrintf("brightmap created for texture '%s'\n", Name.GetChars()); gl_info.Brightmap = new FBrightmapTexture(this); gl_info.bBrightmapChecked = 1; TexMan.AddTexture(gl_info.Brightmap); @@ -302,7 +302,7 @@ void FTexture::CreateDefaultBrightmap() } } // No bright pixels found - DPrintf("No bright pixels found in texture '%s'\n", Name); + DPrintf("No bright pixels found in texture '%s'\n", Name.GetChars()); gl_info.bBrightmapChecked = 1; } else @@ -735,13 +735,13 @@ void gl_ParseBrightmap(FScanner &sc, int deflump) if (bmtex != NULL) { - Printf("Multiple brightmap definitions in texture %s\n", tex? tex->Name : "(null)"); + Printf("Multiple brightmap definitions in texture %s\n", tex? tex->Name.GetChars() : "(null)"); } bmtex = TexMan.FindTexture(sc.String, FTexture::TEX_Any, FTextureManager::TEXMAN_TryAny); if (bmtex == NULL) - Printf("Brightmap '%s' not found in texture '%s'\n", sc.String, tex? tex->Name : "(null)"); + Printf("Brightmap '%s' not found in texture '%s'\n", sc.String, tex? tex->Name.GetChars() : "(null)"); } } if (!tex) @@ -765,7 +765,7 @@ void gl_ParseBrightmap(FScanner &sc, int deflump) { if (tex->bWarped != 0) { - Printf("Cannot combine warping with brightmap on texture '%s'\n", tex->Name); + Printf("Cannot combine warping with brightmap on texture '%s'\n", tex->Name.GetChars()); return; }