Skip to content

Commit 08d7693

Browse files
authored
chore: rename variables for clarity (#9)
1 parent 563af1a commit 08d7693

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

MODULE.bazel.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

async_reference/detail/c_execution_options/c_execution_options.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ecsact_execution_options c_execution_options::c() {
4747
entity_components.push_back(component);
4848
}
4949

50-
create_entity_components_datas.push_back(entity_components.data());
50+
create_entity_components_data.push_back(entity_components.data());
5151
}
5252

5353
options.actions = actions.data();
@@ -67,7 +67,7 @@ ecsact_execution_options c_execution_options::c() {
6767
options.remove_components_length = remove_ids.size();
6868

6969
options.create_entities = create_entity_placeholder_ids.data();
70-
options.create_entities_components = create_entity_components_datas.data();
70+
options.create_entities_components = create_entity_components_data.data();
7171
options.create_entities_length = create_entities_components.size();
7272
options.create_entities_components_length =
7373
create_entity_components_length.data();

async_reference/detail/c_execution_options/c_execution_options.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private:
4242
std::vector<ecsact_component> adds;
4343
std::vector<ecsact_component> updates;
4444

45-
std::vector<ecsact_component*> create_entity_components_datas;
45+
std::vector<ecsact_component*> create_entity_components_data;
4646
std::vector<std::vector<ecsact_component>> create_entity_components;
4747
std::vector<int32_t> create_entity_components_length;
4848
};

serialize_reference/serialize_reference.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ ecsact_restore_error ecsact_restore_as_execution_options(
8787
) {
8888
auto placeholder_ids = std::vector<ecsact_placeholder_entity_id>{};
8989
auto component_ids_list = std::vector<std::vector<ecsact_component_id>>{};
90-
auto component_datas_list =
90+
auto entity_component_data_list =
9191
std::vector<std::vector<std::vector<std::byte>>>{};
9292

9393
auto read_amount = int32_t{};
@@ -103,24 +103,24 @@ ecsact_restore_error ecsact_restore_as_execution_options(
103103

104104
placeholder_ids.reserve(ent_count);
105105
component_ids_list.reserve(ent_count);
106-
component_datas_list.reserve(ent_count);
106+
entity_component_data_list.reserve(ent_count);
107107

108108
for(int32_t ent_idx = 0; ent_count > ent_idx; ++ent_idx) {
109109
placeholder_ids.push_back(static_cast<ecsact_placeholder_entity_id>(ent_idx)
110110
);
111111

112112
auto& component_ids = component_ids_list.emplace_back();
113-
auto& component_datas = component_datas_list.emplace_back();
113+
auto& component_data_list = entity_component_data_list.emplace_back();
114114

115115
auto components_count = int32_t{};
116116
READ_CALLBACK_INTO_VAR(components_count);
117117

118118
component_ids.reserve(components_count);
119-
component_datas.reserve(components_count);
119+
component_data_list.reserve(components_count);
120120

121121
for(int i = 0; components_count > i; ++i) {
122122
auto& component_id = component_ids.emplace_back();
123-
auto& component_data = component_datas.emplace_back();
123+
auto& component_data = component_data_list.emplace_back();
124124
auto component_size = int32_t{};
125125
READ_CALLBACK_INTO_VAR(component_id);
126126
READ_CALLBACK_INTO_VAR(component_size);
@@ -161,8 +161,8 @@ ecsact_restore_error ecsact_restore_as_execution_options(
161161
}
162162

163163
auto entity_components_owner = std::vector<std::vector<ecsact_component>>{};
164-
for(auto i = 0; component_datas_list.size() > i; ++i) {
165-
auto& comp_data = component_datas_list[i];
164+
for(auto i = 0; entity_component_data_list.size() > i; ++i) {
165+
auto& comp_data = entity_component_data_list[i];
166166
auto& comp_ids = component_ids_list[i];
167167

168168
auto& comp_data_list = entity_components_owner.emplace_back();
@@ -217,23 +217,23 @@ void ecsact_dump_entities(
217217
callback(&components_count, sizeof(components_count), callback_user_data);
218218

219219
auto component_ids = std::vector<ecsact_component_id>{};
220-
auto component_datas = std::vector<const void*>{};
220+
auto component_data_list = std::vector<const void*>{};
221221

222222
component_ids.resize(components_count);
223-
component_datas.resize(components_count);
223+
component_data_list.resize(components_count);
224224

225225
ecsact_get_components(
226226
registry_id,
227227
entity,
228228
components_count,
229229
component_ids.data(),
230-
component_datas.data(),
230+
component_data_list.data(),
231231
nullptr
232232
);
233233

234234
for(int i = 0; components_count > i; ++i) {
235235
const auto component_id = component_ids[i];
236-
const auto component_data = component_datas[i];
236+
const auto component_data = component_data_list[i];
237237
const auto component_size = ecsact_serialize_component_size(component_id);
238238

239239
auto serialized_component_data =

test/async/async_ref_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void async_test::RemoveComponent::impl(context& ctx) {
5454
}
5555

5656
void async_test::TryEntity::impl(context& ctx) {
57-
// santity check
57+
// sanity check
5858
ctx.action();
5959
}
6060

0 commit comments

Comments
 (0)