- fix c++11's compile problems.

This commit is contained in:
Christoph Oelckers 2013-08-28 08:33:11 +02:00
parent 4d3f6cae2e
commit 737708b635
7 changed files with 10 additions and 10 deletions

View file

@ -957,7 +957,7 @@ void ScanDirectory(TArray<FFileList> &list, const char *dirpath)
}
}
#elif defined(__sun) || defined(linux)
#elif defined(__sun) || defined(__linux__)
//==========================================================================
//

View file

@ -223,7 +223,7 @@ struct FCoverageBuilder
{
FCoverageVertex *v1 = &shape[i];
FCoverageVertex *v2 = &shape[(i+1) % shape.Size()];
FCoverageLine vl = { *v1, *v2 };
FCoverageLine vl = {{*v1, *v2}};
double dist_v1 = PartitionDistance(v1, bsp);
double dist_v2 = PartitionDistance(v2, bsp);

View file

@ -130,7 +130,7 @@ static int MergeMapSections(int num)
cvertex_t vt;
// first step: Set mapsection for all vertex positions.
for(DWORD i=0;i<numsegs;i++)
for(DWORD i=0;i<(DWORD)numsegs;i++)
{
seg_t * seg = &segs[i];
int section = seg->Subsector->mapsection;
@ -142,7 +142,7 @@ static int MergeMapSections(int num)
}
// second step: Check if any seg references more than one mapsection, either by subsector or by vertex
for(DWORD i=0;i<numsegs;i++)
for(DWORD i=0;i<(DWORD)numsegs;i++)
{
seg_t * seg = &segs[i];
int section = seg->Subsector->mapsection;

View file

@ -781,7 +781,7 @@ void GLPlaneMirrorPortal::DrawContents()
gl.Enable(GL_CLIP_PLANE0+renderdepth);
// This only works properly for non-sloped planes so don't bother with the math.
//double d[4]={origin->a/65536., origin->c/65536., origin->b/65536., FIXED2FLOAT(origin->d)};
double d[4]={0, PlaneMirrorMode, 0, FIXED2FLOAT(origin->d)};
double d[4]={0, static_cast<double>(PlaneMirrorMode), 0, FIXED2FLOAT(origin->d)};
gl.ClipPlane(GL_CLIP_PLANE0+renderdepth, d);
GLRenderer->DrawScene();

View file

@ -44,7 +44,7 @@
#include "i_system.h"
#include "gl/system/gl_cvars.h"
#if defined (unix) || defined (__APPLE__)
#if defined (__unix__) || defined (__APPLE__)
#include <SDL.h>
#define wglGetProcAddress(x) (*SDL_GL_GetProcAddress)(x)
#endif

View file

@ -430,7 +430,7 @@ const FHardwareTexture *FGLTexture::Bind(int texunit, int cm, int clampmode, int
if (!hwtex->Bind(texunit, cm, translation))
{
int w, h;
int w=0, h=0;
// Create this texture
unsigned char * buffer = NULL;