Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions ogsr_engine/xrGame/CarLights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,24 @@ bool CCarLights::IsLight(u16 bone_id)
}
bool CCarLights::findLight(u16 bone_id, SCarLight*& light)
{
LIGHTS_I i, e = m_lights.end();
SCarLight find_light;
find_light.bone_id = bone_id;
i = std::find_if(m_lights.begin(), e, SFindLightPredicate(&find_light));
light = *i;
return i != e; //-V783

auto e = m_lights.end();
auto i = std::find_if(m_lights.begin(), e, SFindLightPredicate(&find_light));
if (i != e)
{
light = *i;
return true;
}
else
return false;
}

CCarLights::~CCarLights()
{
LIGHTS_I i = m_lights.begin(), e = m_lights.end();
for (; i != e; ++i)
xr_delete(*i);
m_lights.clear();
}
}
4 changes: 2 additions & 2 deletions ogsr_engine/xrGame/fs_registrator_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ void fs_registrator::script_register(lua_State* L)

class_<FS_file_list>("FS_file_list").def("Size", &FS_file_list::Size).def("GetAt", &FS_file_list::GetAt).def("Free", &FS_file_list::Free),

/* class_<FS_Path>("FS_Path")
.def_readonly("m_Path", &FS_Path::m_Path)
class_<FS_Path>("FS_Path"),
/* .def_readonly("m_Path", &FS_Path::m_Path)
.def_readonly("m_Root", &FS_Path::m_Root)
.def_readonly("m_Add", &FS_Path::m_Add)
.def_readonly("m_DefExt", &FS_Path::m_DefExt)
Expand Down
2 changes: 0 additions & 2 deletions ogsr_engine/xrGame/ui/UIInventoryUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ bool InventoryUtilities::FreeRoom_inBelt(TIItemContainer& item_list, PIItem _ite
}
}
}
/*
//разместить элемент на найденном месте
if (found_place)
{
Expand All @@ -168,7 +167,6 @@ bool InventoryUtilities::FreeRoom_inBelt(TIItemContainer& item_list, PIItem _ite
}
}
}
*/
}
// remove
item_list.erase(std::remove(item_list.begin(), item_list.end(), _item), item_list.end());
Expand Down