mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 09:09:19 +02:00
refactor(editor): one declaration per statement (cpp:S1659) and no chained assignments (cpp:S1121) in the editor files of the branch; single statements under if/else/for that became two got braces
This commit is contained in:
@@ -151,7 +151,9 @@ void load()
|
||||
std::istringstream line{text};
|
||||
record entry;
|
||||
entry.layer = layer;
|
||||
std::string keyword, hand, km;
|
||||
std::string keyword;
|
||||
std::string hand;
|
||||
std::string km;
|
||||
std::size_t count{0};
|
||||
line >> entry.kind;
|
||||
if (entry.kind != "switch" && entry.kind != "slip" && entry.kind != "crossing")
|
||||
@@ -163,7 +165,8 @@ void load()
|
||||
entry.parts.resize(count);
|
||||
for (auto &part : entry.parts)
|
||||
line >> part;
|
||||
glm::dvec3 start{0.0}, ahead{0.0};
|
||||
glm::dvec3 start{0.0};
|
||||
glm::dvec3 ahead{0.0};
|
||||
glm::dvec2 direction{0.0, 1.0};
|
||||
line >> keyword;
|
||||
if (keyword == "shape")
|
||||
|
||||
Reference in New Issue
Block a user