Skip to content

Commit

Permalink
Merge pull request #2208 from joto/cleanup-flex-table-col
Browse files Browse the repository at this point in the history
Fix unusual member name in column_type_lookup
  • Loading branch information
lonvia authored Jul 9, 2024
2 parents 23b6634 + 7acd35f commit 211c7f5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/flex-table-column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
*/

#include "flex-table-column.hpp"

#include "format.hpp"
#include "pgsql-capabilities.hpp"
#include "util.hpp"

#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdlib>
#include <stdexcept>
Expand All @@ -24,12 +26,12 @@ namespace {
struct column_type_lookup
{
char const *m_name;
table_column_type type;
table_column_type m_type;

char const *name() const noexcept { return m_name; }
};

static std::vector<column_type_lookup> const column_types = {
std::vector<column_type_lookup> const column_types = {
{{"text", table_column_type::text},
{"boolean", table_column_type::boolean},
{"bool", table_column_type::boolean},
Expand Down Expand Up @@ -63,7 +65,7 @@ table_column_type get_column_type_from_string(std::string const &type)
throw fmt_error("Unknown column type '{}'.", type);
}

return column_type->type;
return column_type->m_type;
}

std::string lowercase(std::string const &str)
Expand Down

0 comments on commit 211c7f5

Please sign in to comment.