Skip to content

Bug in Table.h: Mixed(ColumnType v) #13

@bmunkholm

Description

@bmunkholm

In Table.h:
class Mixed {
public:
explicit Mixed(ColumnType v) {assert(v = COLUMN_TYPE_TABLE); m_type = COLUMN_TYPE_TABLE;}

is missing a "=" after "v =" to assert correctly.

Better yet would be to prevent this run-time error at compile time with something like:
class ColumnTypeTable {};
class Mixed {
public:
Mixed(ColumnTypeTable) { ... }
}
Use:
Mixed m(ColumnTypeTable());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions