Skip to content

Lookup tables#49

Open
krzysiek-b-y wants to merge 3 commits intomainfrom
lookup_tables
Open

Lookup tables#49
krzysiek-b-y wants to merge 3 commits intomainfrom
lookup_tables

Conversation

@krzysiek-b-y
Copy link
Copy Markdown
Contributor

No description provided.

template<typename T, std::size_t N> class Row : public std::array<T, N>
{
public:
using containter_type = std::array<T, N>;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo should be container_type

{
auto& ref_this = *this;

for (std::size_t i = 0; i < this->size(); ++i)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo we can use N directly instead of this->size():
for (std::size_t i = 0; i < N; ++i)

{
consteval static std::size_t decode(std::size_t a_value)
{
return a_value + OFFSET;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can get negative number. Maybe some static_assert for better compile time errors ?

{
Row line {};
const auto& source_line = this->at(i);
for (std::size_t word = 0; word < a_columns.size(); ++word)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a_columns.size() can be replaced by N_dest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants