mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-09 19:32:14 +01:00
refactor: the Sonar remarks on the small fixes taken care of
- the log stops through a flag kept in a function, not a global one - the messages are put together with std::format - a vehicle dropped on a trainset in the launcher goes in once the trainset is drawn, so the vehicles are gone through with a plain loop again; the drop split into a new vehicle and a moved one - the scenario that can't be opened is caught as the runtime error it is, a file name outside of the code page as the system error it is - a track of an unknown type is left out through the pointer owning it - the keyword of a track type written out by a function of its own - the picked node forgotten with ranges::replace_if, the empty Forget_Node of the base renderer told why it is empty - FileCased takes the path it works on
This commit is contained in:
@@ -5414,7 +5414,7 @@ void opengl33_renderer::Forget_Node(scene::basic_node const *Node)
|
||||
{
|
||||
if (m_picksceneryitem == Node)
|
||||
m_picksceneryitem = nullptr;
|
||||
std::replace_if(m_picksceneryitems.begin(), m_picksceneryitems.end(), [Node](scene::basic_node const *Item) { return Item == Node; }, nullptr);
|
||||
std::ranges::replace_if(m_picksceneryitems, [Node](scene::basic_node const *Item) { return Item == Node; }, nullptr);
|
||||
}
|
||||
|
||||
glm::dvec3 opengl33_renderer::Update_Mouse_Position()
|
||||
|
||||
@@ -1894,7 +1894,7 @@ opengl_renderer::Forget_Node( scene::basic_node const *Node ) {
|
||||
if( m_picksceneryitem == Node ) {
|
||||
m_picksceneryitem = nullptr;
|
||||
}
|
||||
std::replace_if( m_picksceneryitems.begin(), m_picksceneryitems.end(), [Node]( scene::basic_node const *Item ) { return Item == Node; }, nullptr );
|
||||
std::ranges::replace_if( m_picksceneryitems, [Node]( scene::basic_node const *Item ) { return Item == Node; }, nullptr );
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -91,7 +91,9 @@ public:
|
||||
virtual auto Pick_Control() const -> TSubModel const * = 0;
|
||||
virtual auto Pick_Node() const -> scene::basic_node const * = 0;
|
||||
// a node deleted from the scene is no longer given as picked
|
||||
virtual void Forget_Node( scene::basic_node const *Node ) {}
|
||||
virtual void Forget_Node( scene::basic_node const * /*Node*/ ) {
|
||||
// a renderer which keeps no node picked has none to forget
|
||||
}
|
||||
|
||||
virtual auto Mouse_Position() const -> glm::dvec3 = 0;
|
||||
virtual auto Mouse_Hit() const -> bool { return true; }
|
||||
|
||||
Reference in New Issue
Block a user