Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit c34e192

Browse files
committed
Address comments
1 parent a9d668e commit c34e192

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

impeller/scene/importer/conversions.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Copyright 2013 The Flutter Authors. All rights reserved.
32
// Use of this source code is governed by a BSD-style license that can be
43
// found in the LICENSE file.

impeller/scene/importer/conversions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#pragma once
6+
57
#include <cstddef>
68
#include <map>
79

impeller/scene/importer/importer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#pragma once
6+
57
#include <array>
68
#include <memory>
79

impeller/scene/importer/importer_gltf.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static bool ProcessStaticMesh(const tinygltf::Model& gltf,
102102
///
103103

104104
if (!WithinRange(primitive.indices, gltf.accessors.size())) {
105-
std::cout << "Mesh primitive has no index buffer. Skipping." << std::endl;
105+
std::cerr << "Mesh primitive has no index buffer. Skipping." << std::endl;
106106
return false;
107107
}
108108

impeller/scene/importer/vertices_builder.cc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Copyright 2013 The Flutter Authors. All rights reserved.
32
// Use of this source code is governed by a BSD-style license that can be
43
// found in the LICENSE file.
@@ -50,7 +49,7 @@ void VerticesBuilder::WriteFBVertices(std::vector<fb::Vertex>& vertices) const {
5049
}
5150

5251
template <typename SourceType, size_t Divisor>
53-
void WriteScalars(void* destination,
52+
void WriteComponentsAsScalars(void* destination,
5453
const void* source,
5554
size_t component_count) {
5655
for (size_t i = 0; i < component_count; i++) {
@@ -67,18 +66,18 @@ static std::map<
6766
void(void* destination, const void* source, size_t component_count)>>
6867
kAttributeWriters = {
6968
{VerticesBuilder::ComponentType::kSignedByte,
70-
WriteScalars<int8_t, std::numeric_limits<int8_t>::max()>},
69+
WriteComponentsAsScalars<int8_t, std::numeric_limits<int8_t>::max()>},
7170
{VerticesBuilder::ComponentType::kUnsignedByte,
72-
WriteScalars<uint8_t, std::numeric_limits<uint8_t>::max()>},
71+
WriteComponentsAsScalars<uint8_t, std::numeric_limits<uint8_t>::max()>},
7372
{VerticesBuilder::ComponentType::kSignedShort,
74-
WriteScalars<int16_t, std::numeric_limits<int16_t>::max()>},
73+
WriteComponentsAsScalars<int16_t, std::numeric_limits<int16_t>::max()>},
7574
{VerticesBuilder::ComponentType::kUnsignedShort,
76-
WriteScalars<uint16_t, std::numeric_limits<uint16_t>::max()>},
75+
WriteComponentsAsScalars<uint16_t, std::numeric_limits<uint16_t>::max()>},
7776
{VerticesBuilder::ComponentType::kSignedInt,
78-
WriteScalars<int32_t, std::numeric_limits<int32_t>::max()>},
77+
WriteComponentsAsScalars<int32_t, std::numeric_limits<int32_t>::max()>},
7978
{VerticesBuilder::ComponentType::kUnsignedInt,
80-
WriteScalars<uint32_t, std::numeric_limits<uint32_t>::max()>},
81-
{VerticesBuilder::ComponentType::kFloat, WriteScalars<float, 1>},
79+
WriteComponentsAsScalars<uint32_t, std::numeric_limits<uint32_t>::max()>},
80+
{VerticesBuilder::ComponentType::kFloat, WriteComponentsAsScalars<float, 1>},
8281
};
8382

8483
void VerticesBuilder::SetAttributeFromBuffer(Attribute attribute,

impeller/scene/importer/vertices_builder.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#pragma once
6+
57
#include <cstddef>
68
#include <map>
79

0 commit comments

Comments
 (0)