# fix W4 warnings on VC
This was SVN commit r3726.
This commit is contained in:
parent
44901d38b9
commit
b37d3f2095
@ -137,8 +137,8 @@ bool CHFTracer::RayIntersect(CVector3D& origin,CVector3D& dir,int& x,int& z,CVec
|
||||
float fcz=traversalPt.Z*invCellSize;
|
||||
int cz=int(fcz);
|
||||
|
||||
float invdx = 1.0e20;
|
||||
float invdz = 1.0e20;
|
||||
float invdx = 1.0e20f;
|
||||
float invdz = 1.0e20f;
|
||||
|
||||
if (fabs(dir.X) > 1.0e-20)
|
||||
invdx = float(1.0/fabs(dir.X));
|
||||
|
@ -53,7 +53,7 @@ bool CTerrain::Initialize(u32 size,const u16* data)
|
||||
// store terrain size
|
||||
m_MapSize=(size*PATCH_SIZE)+1;
|
||||
m_MapSizePatches=size;
|
||||
WaterManager *WaterMgr = g_Renderer.GetWaterManager();
|
||||
// WaterManager *WaterMgr = g_Renderer.GetWaterManager();
|
||||
// WaterMgr->InitWave();
|
||||
// allocate data for new terrain
|
||||
m_Heightmap=new u16[m_MapSize*m_MapSize];
|
||||
|
@ -689,10 +689,12 @@ LibError stl_get_container_info(const char* type_name, const u8* p, size_t size,
|
||||
CONTAINER(slist, STRINGIZE(STL_SLIST) "<*>")
|
||||
#endif
|
||||
|
||||
// note: do not raise warnings - these can happen for new
|
||||
// STL classes or if the debuggee's memory is corrupted.
|
||||
if(!handled)
|
||||
return ERR_STL_CNT_UNKNOWN;
|
||||
return ERR_STL_CNT_UNKNOWN; // NOWARN
|
||||
if(!valid)
|
||||
return ERR_STL_CNT_INVALID;
|
||||
return ERR_STL_CNT_INVALID; // NOWARN
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
|
@ -751,7 +751,6 @@ int vfs_opt_auto_build(const char* trace_filename,
|
||||
}
|
||||
|
||||
UNREACHABLE;
|
||||
return ERR_OK; // To quelch gcc "control reaches end of non-void function"
|
||||
}
|
||||
|
||||
LibError vfs_opt_rebuild_main_archive(const char* trace_filename, const char* archive_fn_fmt)
|
||||
|
@ -467,7 +467,7 @@ static LibError tex_load_impl(FileIOBuf file_, size_t file_size, Tex* t)
|
||||
WARN_RETURN(ERR_TEX_FMT_INVALID);
|
||||
// .. note: decode() may have decompressed the image; cannot use file_size.
|
||||
size_t hm_size;
|
||||
void* unused = mem_get_ptr(t->hm, &hm_size);
|
||||
(void)mem_get_ptr(t->hm, &hm_size);
|
||||
if(hm_size < t->ofs + tex_img_size(t))
|
||||
WARN_RETURN(ERR_TEX_INVALID_SIZE);
|
||||
|
||||
|
@ -107,7 +107,7 @@ uint CBrush::Helper::SliceNewVertex(SliceInfo& si, uint v1, uint v2)
|
||||
|
||||
nvi.v1 = v1;
|
||||
nvi.v2 = v2;
|
||||
nvi.res = si.result->m_Vertices.size();
|
||||
nvi.res = (uint)si.result->m_Vertices.size();
|
||||
nvi.neighb1 = no_vertex;
|
||||
nvi.neighb2 = no_vertex;
|
||||
si.result->m_Vertices.push_back(newpos);
|
||||
@ -160,7 +160,7 @@ void CBrush::Slice(const CPlane& plane, CBrush& result) const
|
||||
si.v[i].d = plane.DistanceToPlane(m_Vertices[i]);
|
||||
if (si.v[i].d >= 0.0)
|
||||
{
|
||||
si.v[i].res = result.m_Vertices.size();
|
||||
si.v[i].res = (uint)result.m_Vertices.size();
|
||||
result.m_Vertices.push_back(m_Vertices[i]);
|
||||
}
|
||||
else
|
||||
@ -171,7 +171,7 @@ void CBrush::Slice(const CPlane& plane, CBrush& result) const
|
||||
|
||||
// Transfer faces
|
||||
uint firstInFace = no_vertex; // in original brush
|
||||
uint startInResultFaceArray = ~0;
|
||||
uint startInResultFaceArray = ~0u;
|
||||
|
||||
for(uint i = 0; i < m_Faces.size(); ++i)
|
||||
{
|
||||
@ -180,7 +180,7 @@ void CBrush::Slice(const CPlane& plane, CBrush& result) const
|
||||
debug_assert(si.thisFaceNewVertex == no_vertex);
|
||||
|
||||
firstInFace = m_Faces[i];
|
||||
startInResultFaceArray = result.m_Faces.size();
|
||||
startInResultFaceArray = (uint)result.m_Faces.size();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
void Render() const;
|
||||
|
||||
private:
|
||||
static const uint no_vertex = ~0;
|
||||
static const uint no_vertex = ~0u;
|
||||
|
||||
typedef std::vector<CVector3D> Vertices;
|
||||
typedef std::vector<uint> FaceIndices;
|
||||
|
Loading…
Reference in New Issue
Block a user