Skip to content

Commit c22cf4c

Browse files
intorrXottab-DUTY
authored andcommitted
Part 6 of the experiment to remove doug_lea_allocator. Small x64 fixes.
1 parent a3f30e7 commit c22cf4c

File tree

7 files changed

+18
-8
lines changed

7 files changed

+18
-8
lines changed

src/Layers/xrRender/r__dsgraph_render_lods.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void D3DXRenderBase::r_dsgraph_render_lods(bool _setup_zb, bool _clear)
3939

4040
for (u32 i = 0; i < lstLODs.size(); i++)
4141
{
42-
const u32 iBatchSize = std::min(lstLODs.size() - i, uiImpostersFit);
42+
const u32 iBatchSize = std::min(lstLODs.size() - i, (size_t)uiImpostersFit);
4343
int cur_count = 0;
4444
u32 vOffset;
4545
FLOD::_hw* V =

src/Layers/xrRenderPC_R2/r2_R_render.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ void CRender::Render()
337337
LP_pending.clear();
338338
{
339339
// perform tests
340-
u32 count = 0;
340+
auto count = 0;
341341
light_Package& LP = Lights.package;
342342

343343
// stats
@@ -349,7 +349,7 @@ void CRender::Render()
349349
count = _max(count, LP.v_point.size());
350350
count = _max(count, LP.v_spot.size());
351351
count = _max(count, LP.v_shadowed.size());
352-
for (u32 it = 0; it < count; it++)
352+
for (auto it = 0; it < count; it++)
353353
{
354354
if (it < LP.v_point.size())
355355
{

src/Layers/xrRenderPC_R3/r3_R_render.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ void CRender::Render()
357357
{
358358
PIX_EVENT(DEFER_TEST_LIGHT_VIS);
359359
// perform tests
360-
u32 count = 0;
360+
auto count = 0;
361361
light_Package& LP = Lights.package;
362362

363363
// stats
@@ -369,7 +369,7 @@ void CRender::Render()
369369
count = _max(count, LP.v_point.size());
370370
count = _max(count, LP.v_spot.size());
371371
count = _max(count, LP.v_shadowed.size());
372-
for (u32 it = 0; it < count; it++)
372+
for (auto it = 0; it < count; it++)
373373
{
374374
if (it < LP.v_point.size())
375375
{

src/Layers/xrRenderPC_R4/r4_R_render.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ void CRender::Render()
358358
{
359359
PIX_EVENT(DEFER_TEST_LIGHT_VIS);
360360
// perform tests
361-
u32 count = 0;
361+
auto count = 0;
362362
light_Package& LP = Lights.package;
363363

364364
// stats
@@ -370,7 +370,7 @@ void CRender::Render()
370370
count = _max(count, LP.v_point.size());
371371
count = _max(count, LP.v_spot.size());
372372
count = _max(count, LP.v_shadowed.size());
373-
for (u32 it = 0; it < count; it++)
373+
for (auto it = 0; it < count; it++)
374374
{
375375
if (it < LP.v_point.size())
376376
{

src/xrCore/log.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ void Log(const char* msg, u32 dop)
133133
Log(buf);
134134
}
135135

136+
void Log(const char* msg, u64 dop)
137+
{
138+
u32 buffer_size = (xr_strlen(msg) + 1 + 64 + 1) * sizeof(char);
139+
PSTR buf = (PSTR)_alloca(buffer_size);
140+
141+
xr_sprintf(buf, buffer_size, "%s %d", msg, dop);
142+
Log(buf);
143+
}
144+
136145
void Log(const char* msg, int dop)
137146
{
138147
u32 buffer_size = (xr_strlen(msg) + 1 + 11 + 1) * sizeof(char);

src/xrCore/log.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ void XRCORE_API Log(LPCSTR msg);
1616
void XRCORE_API Log(LPCSTR msg);
1717
void XRCORE_API Log(LPCSTR msg, LPCSTR dop);
1818
void XRCORE_API Log(LPCSTR msg, u32 dop);
19+
void XRCORE_API Log(LPCSTR msg, u64 dop);
1920
void XRCORE_API Log(LPCSTR msg, int dop);
2021
void XRCORE_API Log(LPCSTR msg, float dop);
2122
void XRCORE_API Log(LPCSTR msg, const Fvector& dop);

src/xrEngine/XR_IOConsole.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ void CConsole::DrawBackgrounds(bool bGame)
393393
float list_w = pFont->SizeOf_(max_str) + 2.0f * w1;
394394

395395
float font_h = pFont->CurrentHeight_();
396-
float tips_h = std::min(m_tips.size(), (u32)VIEW_TIPS_COUNT) * font_h;
396+
float tips_h = std::min(m_tips.size(), (size_t)VIEW_TIPS_COUNT) * font_h;
397397
tips_h += (m_tips.size() > 0) ? 5.0f : 0.0f;
398398

399399
Frect pr, sr;

0 commit comments

Comments
 (0)