Skip to content

Commit

Permalink
fix(core): add missing typename to dependent types
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
RiscadoA and github-actions[bot] authored Sep 26, 2023
1 parent 7ac3c9d commit 7c74d83
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
32 changes: 16 additions & 16 deletions core/include/cubos/core/reflection/external/map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ CUBOS_REFLECT_EXTERNAL_TEMPLATE((typename K, typename V), (std::map<K, V>))
[](uintptr_t instance, bool writeable) -> void* {
if (writeable)
{
return new Map::iterator(reinterpret_cast<Map*>(instance)->begin());
return new typename Map::iterator(reinterpret_cast<Map*>(instance)->begin());
}
else
{
return new Map::const_iterator(reinterpret_cast<const Map*>(instance)->cbegin());
return new typename Map::const_iterator(reinterpret_cast<const Map*>(instance)->cbegin());
}
} /*begin*/,
[](uintptr_t instance, const void* key, bool writeable) -> void* {
Expand All @@ -35,7 +35,7 @@ CUBOS_REFLECT_EXTERNAL_TEMPLATE((typename K, typename V), (std::map<K, V>))
{
return nullptr;
}
return new Map::iterator(it);
return new typename Map::iterator(it);
}
else
{
Expand All @@ -44,49 +44,49 @@ CUBOS_REFLECT_EXTERNAL_TEMPLATE((typename K, typename V), (std::map<K, V>))
{
return nullptr;

Check warning on line 45 in core/include/cubos/core/reflection/external/map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/map.hpp#L45

Added line #L45 was not covered by tests
}
return new Map::const_iterator(it);
return new typename Map::const_iterator(it);

Check warning on line 47 in core/include/cubos/core/reflection/external/map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/map.hpp#L47

Added line #L47 was not covered by tests
}
} /*find*/,
[](uintptr_t instance, void* iterator, bool writeable) -> bool {
if (writeable)
{
++*static_cast<Map::iterator*>(iterator);
return *static_cast<Map::iterator*>(iterator) != reinterpret_cast<Map*>(instance)->end();
++*static_cast<typename Map::iterator*>(iterator);
return *static_cast<typename Map::iterator*>(iterator) != reinterpret_cast<Map*>(instance)->end();
}
else
{
++*static_cast<Map::const_iterator*>(iterator);
return *static_cast<Map::const_iterator*>(iterator) != reinterpret_cast<const Map*>(instance)->cend();
++*static_cast<typename Map::const_iterator*>(iterator);
return *static_cast<typename Map::const_iterator*>(iterator) != reinterpret_cast<const Map*>(instance)->cend();
}
} /*advance*/,
[](void* iterator, bool writeable) {
if (writeable)
{
delete static_cast<Map::iterator*>(iterator);
delete static_cast<typename Map::iterator*>(iterator);
}
else
{
delete static_cast<Map::const_iterator*>(iterator);
delete static_cast<typename Map::const_iterator*>(iterator);

Check warning on line 69 in core/include/cubos/core/reflection/external/map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/map.hpp#L69

Added line #L69 was not covered by tests
}
} /*stop*/,
[](const void* iterator, bool writeable) -> const void* {
if (writeable)
{
return &(*static_cast<const Map::iterator*>(iterator))->first;
return &(*static_cast<const typename Map::iterator*>(iterator))->first;
}
else
{
return &(*static_cast<const Map::const_iterator*>(iterator))->first;
return &(*static_cast<const typename Map::const_iterator*>(iterator))->first;

Check warning on line 79 in core/include/cubos/core/reflection/external/map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/map.hpp#L79

Added line #L79 was not covered by tests
}
} /*key*/,
[](const void* iterator, bool writeable) -> uintptr_t {
if (writeable)
{
return reinterpret_cast<uintptr_t>(&(*static_cast<const Map::iterator*>(iterator))->second);
return reinterpret_cast<uintptr_t>(&(*static_cast<const typename Map::iterator*>(iterator))->second);
}
else
{
return reinterpret_cast<uintptr_t>(&(*static_cast<const Map::const_iterator*>(iterator))->second);
return reinterpret_cast<uintptr_t>(&(*static_cast<const typename Map::const_iterator*>(iterator))->second);

Check warning on line 89 in core/include/cubos/core/reflection/external/map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/map.hpp#L89

Added line #L89 was not covered by tests
}
} /*value*/);

Expand Down Expand Up @@ -118,11 +118,11 @@ CUBOS_REFLECT_EXTERNAL_TEMPLATE((typename K, typename V), (std::map<K, V>))
auto* map = static_cast<Map*>(instance);
if (writeable)
{
map->erase(*static_cast<const Map::iterator*>(iterator));
map->erase(*static_cast<const typename Map::iterator*>(iterator));
}
else
{
map->erase(*static_cast<const Map::const_iterator*>(iterator));
map->erase(*static_cast<const typename Map::const_iterator*>(iterator));

Check warning on line 125 in core/include/cubos/core/reflection/external/map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/map.hpp#L125

Added line #L125 was not covered by tests
}
});

Expand Down
32 changes: 16 additions & 16 deletions core/include/cubos/core/reflection/external/unordered_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ CUBOS_REFLECT_EXTERNAL_TEMPLATE((typename K, typename V), (std::unordered_map<K,
[](uintptr_t instance, bool writeable) -> void* {
if (writeable)
{
return new Map::iterator(reinterpret_cast<Map*>(instance)->begin());
return new typename Map::iterator(reinterpret_cast<Map*>(instance)->begin());
}
else
{
return new Map::const_iterator(reinterpret_cast<const Map*>(instance)->cbegin());
return new typename Map::const_iterator(reinterpret_cast<const Map*>(instance)->cbegin());
}
} /*begin*/,
[](uintptr_t instance, const void* key, bool writeable) -> void* {
Expand All @@ -35,7 +35,7 @@ CUBOS_REFLECT_EXTERNAL_TEMPLATE((typename K, typename V), (std::unordered_map<K,
{
return nullptr;
}
return new Map::iterator(it);
return new typename Map::iterator(it);
}
else
{
Expand All @@ -44,49 +44,49 @@ CUBOS_REFLECT_EXTERNAL_TEMPLATE((typename K, typename V), (std::unordered_map<K,
{
return nullptr;

Check warning on line 45 in core/include/cubos/core/reflection/external/unordered_map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/unordered_map.hpp#L45

Added line #L45 was not covered by tests
}
return new Map::const_iterator(it);
return new typename Map::const_iterator(it);

Check warning on line 47 in core/include/cubos/core/reflection/external/unordered_map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/unordered_map.hpp#L47

Added line #L47 was not covered by tests
}
} /*find*/,
[](uintptr_t instance, void* iterator, bool writeable) {
if (writeable)
{
++*static_cast<Map::iterator*>(iterator);
return *static_cast<Map::iterator*>(iterator) != reinterpret_cast<Map*>(instance)->end();
++*static_cast<typename Map::iterator*>(iterator);
return *static_cast<typename Map::iterator*>(iterator) != reinterpret_cast<Map*>(instance)->end();
}
else
{
++*static_cast<Map::const_iterator*>(iterator);
return *static_cast<Map::const_iterator*>(iterator) != reinterpret_cast<const Map*>(instance)->cend();
++*static_cast<typename Map::const_iterator*>(iterator);
return *static_cast<typename Map::const_iterator*>(iterator) != reinterpret_cast<const Map*>(instance)->cend();
}
} /*advance*/,
[](void* iterator, bool writeable) {
if (writeable)
{
delete static_cast<Map::iterator*>(iterator);
delete static_cast<typename Map::iterator*>(iterator);
}
else
{
delete static_cast<Map::const_iterator*>(iterator);
delete static_cast<typename Map::const_iterator*>(iterator);

Check warning on line 69 in core/include/cubos/core/reflection/external/unordered_map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/unordered_map.hpp#L69

Added line #L69 was not covered by tests
}
} /*stop*/,
[](const void* iterator, bool writeable) -> const void* {
if (writeable)
{
return &(*static_cast<const Map::iterator*>(iterator))->first;
return &(*static_cast<const typename Map::iterator*>(iterator))->first;
}
else
{
return &(*static_cast<const Map::const_iterator*>(iterator))->first;
return &(*static_cast<const typename Map::const_iterator*>(iterator))->first;

Check warning on line 79 in core/include/cubos/core/reflection/external/unordered_map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/unordered_map.hpp#L79

Added line #L79 was not covered by tests
}
} /*key*/,
[](const void* iterator, bool writeable) -> uintptr_t {
if (writeable)
{
return reinterpret_cast<uintptr_t>(&(*static_cast<const Map::iterator*>(iterator))->second);
return reinterpret_cast<uintptr_t>(&(*static_cast<const typename Map::iterator*>(iterator))->second);
}
else
{
return reinterpret_cast<uintptr_t>(&(*static_cast<const Map::const_iterator*>(iterator))->second);
return reinterpret_cast<uintptr_t>(&(*static_cast<const typename Map::const_iterator*>(iterator))->second);

Check warning on line 89 in core/include/cubos/core/reflection/external/unordered_map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/unordered_map.hpp#L89

Added line #L89 was not covered by tests
}
} /*value*/);

Expand Down Expand Up @@ -118,11 +118,11 @@ CUBOS_REFLECT_EXTERNAL_TEMPLATE((typename K, typename V), (std::unordered_map<K,
auto* map = static_cast<Map*>(instance);
if (writeable)
{
map->erase(*static_cast<const Map::iterator*>(iterator));
map->erase(*static_cast<const typename Map::iterator*>(iterator));
}
else
{
map->erase(*static_cast<const Map::const_iterator*>(iterator));
map->erase(*static_cast<const typename Map::const_iterator*>(iterator));

Check warning on line 125 in core/include/cubos/core/reflection/external/unordered_map.hpp

View check run for this annotation

Codecov / codecov/patch

core/include/cubos/core/reflection/external/unordered_map.hpp#L125

Added line #L125 was not covered by tests
}
});

Expand Down

0 comments on commit 7c74d83

Please sign in to comment.