mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-29 04:19:20 +01:00
refactor: rename the import methods and the module variables (Sonar S1669) (#363)
import and module are contextual keywords of C++20 modules. The text loaders of the scene nodes (shape_node, lines_node, road_node, junction_node, roadpoint_node, sweep_node) become import_from(), the WASM module of the screen host's cache entry and of load() becomes wasm_module, and the path of the written test module becomes module_path. Renames only.
This commit is contained in:
@@ -576,7 +576,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
else if( nodedata.type == "road" ) {
|
||||
|
||||
auto *road { new road_node( nodedata ) };
|
||||
road->import(
|
||||
road->import_from(
|
||||
Input,
|
||||
( Scratchpad.location.offset.empty() ?
|
||||
glm::dvec3 { 0.0 } :
|
||||
@@ -592,7 +592,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
else if( nodedata.type == "sweep" ) {
|
||||
|
||||
auto *sweep { new sweep_node( nodedata ) };
|
||||
sweep->import(
|
||||
sweep->import_from(
|
||||
Input,
|
||||
( Scratchpad.location.offset.empty() ?
|
||||
glm::dvec3 { 0.0 } :
|
||||
@@ -606,7 +606,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
else if( nodedata.type == "junction" ) {
|
||||
|
||||
auto *junction { new junction_node( nodedata ) };
|
||||
junction->import(
|
||||
junction->import_from(
|
||||
Input,
|
||||
( Scratchpad.location.offset.empty() ?
|
||||
glm::dvec3 { 0.0 } :
|
||||
@@ -638,7 +638,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
else if( roadpoint_node::is_keyword( nodedata.type ) ) {
|
||||
// level crossing, or a point where road vehicles appear or are taken away
|
||||
auto *point { new roadpoint_node( nodedata ) };
|
||||
point->import(
|
||||
point->import_from(
|
||||
Input,
|
||||
( Scratchpad.location.offset.empty() ?
|
||||
glm::dvec3 { 0.0 } :
|
||||
@@ -739,7 +739,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
if( false == skip ) {
|
||||
|
||||
++Scratchpad.binary.geometry_imported;
|
||||
auto shape { scene::shape_node().import( Input, nodedata ) };
|
||||
auto shape { scene::shape_node().import_from( Input, nodedata ) };
|
||||
material = shape.data().material;
|
||||
if( true == Global.editor_session ) {
|
||||
shape.source_file( scene::terrain_file::reference_of( Input.Name() ) );
|
||||
@@ -777,7 +777,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
|
||||
++Scratchpad.binary.geometry_imported;
|
||||
simulation::Region->insert(
|
||||
scene::lines_node().import(
|
||||
scene::lines_node().import_from(
|
||||
Input, nodedata ),
|
||||
Scratchpad );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user