Skip to content

Commit c6dfb5e

Browse files
committed
code-style
1 parent e92402a commit c6dfb5e

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

game/graphics/mesh/protomesh.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,30 +170,29 @@ ProtoMesh::ProtoMesh(const phoenix::model &library, std::unique_ptr<Skeleton>&&
170170

171171
ProtoMesh::ProtoMesh(const phoenix::model_hierarchy& library, std::unique_ptr<Skeleton>&& sk, std::string_view fname)
172172
:skeleton(std::move(sk)), fname(fname) {
173-
174173
nodes.resize(skeleton == nullptr ? 0 : skeleton->nodes.size());
175-
for (size_t i = 0; i < nodes.size(); ++i) {
174+
for(size_t i = 0; i < nodes.size(); ++i) {
176175
Node& n = nodes[i];
177176
auto& src = skeleton->nodes[i];
178177
n.parentId = src.parent;
179178
n.transform = src.tr;
180179
}
181180

182-
for (auto& i : nodes)
183-
if (i.parentId < nodes.size())
181+
for(auto& i : nodes)
182+
if(i.parentId < nodes.size())
184183
nodes[i.parentId].hasChild = true;
185184

186185
size_t subCount = 0;
187-
for (auto& i : nodes) {
186+
for(auto& i : nodes) {
188187
i.submeshIdB = subCount;
189188
i.submeshIdE = subCount;
190189
}
191190
submeshId.resize(subCount);
192191

193-
if (skeleton != nullptr) {
194-
for (size_t i = 0; i < skeleton->nodes.size(); ++i) {
192+
if(skeleton != nullptr) {
193+
for(size_t i = 0; i < skeleton->nodes.size(); ++i) {
195194
auto& n = skeleton->nodes[i];
196-
if (n.name.find("ZS_POS") == 0) {
195+
if(n.name.find("ZS_POS") == 0) {
197196
Pos p;
198197
p.name = n.name;
199198
p.node = i;
@@ -213,7 +212,7 @@ ProtoMesh::ProtoMesh(const phoenix::model_mesh& library, std::unique_ptr<Skeleto
213212
auto& att = attach.back();
214213
att.name = m.first;
215214
att.shape.reset(PhysicMeshShape::load(std::move(pack)));
216-
}
215+
}
217216

218217
nodes.resize(skeleton==nullptr ? 0 : skeleton->nodes.size());
219218
for(size_t i=0;i<nodes.size();++i) {

game/graphics/mesh/protomesh.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PackedMesh;
1919

2020
class ProtoMesh {
2121
public:
22-
using Vertex =Resources::VertexA;
22+
using Vertex = Resources::VertexA;
2323

2424
ProtoMesh(PackedMesh&& pm, std::string_view fname);
2525
ProtoMesh(PackedMesh&& pm, const std::vector<phoenix::morph_animation>& aniList, std::string_view fname);

0 commit comments

Comments
 (0)