Skip to content

Commit

Permalink
Simplify Settings toFieldName logic relating to dynamic columns
Browse files Browse the repository at this point in the history
  • Loading branch information
BenBE authored and natoscott committed Sep 4, 2024
1 parent 9d9f4bf commit efd05e0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,9 @@ static const char* toFieldName(Hashtable* columns, int id, bool* enabled) {
}
if (id >= ROW_DYNAMIC_FIELDS) {
const DynamicColumn* column = DynamicColumn_lookup(columns, id);
if (!column) {
if (enabled)
*enabled = false;
return NULL;
}
if (enabled)
*enabled = column->enabled;
return column->name;
*enabled = column ? column->enabled : false;
return column ? column->name : NULL;
}
if (enabled)
*enabled = true;
Expand Down

0 comments on commit efd05e0

Please sign in to comment.