Skip to content

Commit abef089

Browse files
committed
Fix Wunused-variable warnings
1 parent c7959e4 commit abef089

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+127
-83
lines changed

src/Layers/xrRender/r__dsgraph_build.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void R_dsgraph_structure::insert_dynamic(IRenderable* root, dxRender_Visual* pVi
9090

9191
// Shadows registering
9292
#if RENDER == R_R1
93-
RI.L_Shadows->add_element(_MatrixItem{ SSA, root, pVisual, xform });
93+
RI.L_Shadows->add_element(_MatrixItem{SSA, root, pVisual, xform});
9494
#endif
9595
if (root && root->renderable_Invisible())
9696
return;

src/utils/xrQSlim/MxQSlim.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ void MxEdgeQSlim::apply_mesh_penalties(MxQSlimEdge* info)
298298
if (nfailed)
299299
bias += nfailed * meshing_penalty;
300300

301-
static u32 a = 0;
302301
// if (a)
303302
{
304303
double Nmin1 = check_local_inversion(info->v1, info->v2, info->vnew);
@@ -481,8 +480,7 @@ void MxEdgeQSlim::update_pre_contract(const MxPairContraction& conx)
481480
if (u == v1 || varray_find(star, u))
482481
{
483482
// This is a useless link --- kill it
484-
bool found = varray_find(edge_links(u), e, &j);
485-
VERIFY(found);
483+
VERIFY(varray_find(edge_links(u), e, &j));
486484
edge_links(u).remove(j);
487485
heap.remove(e);
488486
if (u != v1)

src/utils/xrQSlim/MxStdModel.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ MxVertexID MxStdModel::alloc_vertex(float x, float y, float z)
4848
vertex_mark_valid(id);
4949

5050
face_links.add(xr_new<MxFaceList>());
51-
unsigned int l = face_links.last_id();
52-
VERIFY(l == id);
51+
VERIFY(face_links.last_id() == id);
5352
VERIFY(neighbors(id).length() == 0);
5453

5554
return id;
@@ -560,8 +559,7 @@ void MxStdModel::apply_expansion(const MxPairExpansion& conx)
560559
MxFaceID fid = conx.delta_faces(i);
561560
face(fid).remap_vertex(v1, v2);
562561
neighbors(v2).add(fid);
563-
bool found = varray_find(neighbors(v1), fid, &j);
564-
VERIFY(found);
562+
VERIFY(varray_find(neighbors(v1), fid, &j));
565563
neighbors(v1).remove(j);
566564
}
567565

src/xrAICore/Navigation/PatrolPath/patrol_path_storage.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ void CPatrolPathStorage::load_raw(
3131

3232
shared_str patrol_name;
3333
sub_chunk->r_stringZ(patrol_name);
34-
const_iterator I = m_registry.find(patrol_name);
35-
VERIFY3(I == m_registry.end(), "Duplicated patrol path found", *patrol_name);
34+
VERIFY3(m_registry.find(patrol_name) == m_registry.end(), "Duplicated patrol path found", *patrol_name);
3635
m_registry.emplace(
3736
patrol_name, &(xr_new<CPatrolPath>(patrol_name))->load_raw(level_graph, cross, game_graph, *sub_chunk)
3837
);

src/xrAICore/Navigation/graph_vertex_inline.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ IC typename _graph_type::CEdge* CSGraphVertex::edge(const _vertex_id_type& verte
6565
TEMPLATE_SPECIALIZATION
6666
IC void CSGraphVertex::add_edge(CGraphVertex* vertex, const typename _graph_type::CEdge::edge_weight_type& edge_weight)
6767
{
68-
typename EDGES::iterator I = std::find(m_edges.begin(), m_edges.end(), vertex->vertex_id());
69-
VERIFY(m_edges.end() == I);
68+
VERIFY(m_edges.end() == std::find(m_edges.begin(), m_edges.end(), vertex->vertex_id()));
7069
vertex->on_edge_addition(this);
7170
m_edges.push_back(typename _graph_type::CEdge(edge_weight, vertex));
7271
++*m_edge_count;
@@ -86,8 +85,7 @@ IC void CSGraphVertex::remove_edge(const _vertex_id_type& vertex_id)
8685
TEMPLATE_SPECIALIZATION
8786
IC void CSGraphVertex::on_edge_addition(CGraphVertex* vertex)
8887
{
89-
typename VERTICES::const_iterator I = std::find(m_vertices.begin(), m_vertices.end(), vertex);
90-
VERIFY(I == m_vertices.end());
88+
VERIFY(std::find(m_vertices.begin(), m_vertices.end(), vertex) == m_vertices.end());
9189
m_vertices.push_back(vertex);
9290
}
9391

src/xrEngine/Rain.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
#endif
1515

1616
// Warning: duplicated in dxRainRender
17-
static const int max_desired_items = 2500;
18-
static const float source_radius = 12.5f;
17+
//static const int max_desired_items = 2500;
18+
//static const float source_radius = 12.5f;
1919
static const float source_offset = 40.f;
2020
static const float max_distance = source_offset * 1.25f;
21-
static const float sink_offset = -(max_distance - source_offset);
22-
static const float drop_length = 5.f;
23-
static const float drop_width = 0.30f;
21+
//static const float sink_offset = -(max_distance - source_offset);
22+
//static const float drop_length = 5.f;
23+
//static const float drop_width = 0.30f;
2424
static const float drop_angle = 3.0f;
2525
static const float drop_max_angle = deg2rad(10.f);
2626
static const float drop_max_wind_vel = 20.0f;
2727
static const float drop_speed_min = 40.f;
2828
static const float drop_speed_max = 80.f;
2929

3030
const int max_particles = 1000;
31-
const int particles_cache = 400;
31+
//const int particles_cache = 400;
3232
const float particles_time = .3f;
3333

3434
//////////////////////////////////////////////////////////////////////

src/xrEngine/XR_IOConsole.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
#include "GameFont.h"
1515

1616
#include "Include/xrRender/UIRender.h"
17+
#include "xrUICore/ui_defs.h"
1718

18-
static float const UI_BASE_WIDTH = 1024.0f;
19-
static float const UI_BASE_HEIGHT = 768.0f;
2019
static float const LDIST = 0.05f;
2120
static u32 const cmd_history_max = 64;
2221

src/xrEngine/xrSheduler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ void CSheduler::ProcessStep()
319319
{
320320
// Normal priority
321321
const u32 dwTime = Device.dwTimeGlobal;
322+
323+
#ifdef DEBUG
322324
CTimer eTimer;
325+
#endif
323326

324327
for (int i = 0; !Items.empty() && Top().dwTimeForExecute < dwTime; ++i)
325328
{

src/xrGame/Actor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
#include "ui/UIDragDropReferenceList.h"
7676
#include "xrCore/xr_token.h"
7777

78-
const u32 patch_frames = 50;
79-
const float respawn_delay = 1.f;
80-
const float respawn_auto = 7.f;
78+
//const u32 patch_frames = 50;
79+
//const float respawn_delay = 1.f;
80+
//const float respawn_auto = 7.f;
8181

8282
constexpr float default_feedback_duration = 0.2f;
8383

src/xrGame/ActorAnimation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,11 @@ CMotion* FindMotionKeys(MotionID motion_ID, IRenderVisual* V)
316316

317317
#ifdef DEBUG
318318
BOOL g_ShowAnimationInfo = FALSE;
319-
#endif // DEBUG
320319
constexpr pcstr mov_state[] = {
321320
"idle", "walk", "run", "sprint",
322321
};
322+
#endif // DEBUG
323+
323324
void CActor::g_SetAnimation(u32 mstate_rl)
324325
{
325326
if (!g_Alive())

0 commit comments

Comments
 (0)