Fix for removal of operator bool

This commit is contained in:
Maarten L. Hekkelman
2026-03-17 13:30:29 +01:00
parent cb109bacc4
commit 1e39c43cd2
2 changed files with 10 additions and 10 deletions

View File

@@ -412,7 +412,7 @@ category_index::entry *category_index::insert(category &cat, entry *h, row *v)
std::ostringstream os;
for (auto col : cat.key_items())
{
if (rh[col])
if (not rh[col].empty())
os << col << ": " << std::quoted(rh[col].str()) << "; ";
}

View File

@@ -474,13 +474,13 @@ void checkChemCompRecords(datablock &db)
{
std::vector<item> items;
if (not chem_comp_entry["type"])
if (chem_comp_entry["type"].empty())
items.emplace_back("type", compound->type());
if (not chem_comp_entry["name"])
if (chem_comp_entry["name"].empty())
items.emplace_back("name", compound->name());
if (not chem_comp_entry["formula"])
if (chem_comp_entry["formula"].empty())
items.emplace_back("formula", compound->formula());
if (not chem_comp_entry["formula_weight"])
if (chem_comp_entry["formula_weight"].empty())
items.emplace_back("formula_weight", item_value{ compound->formula_weight(), 3 });
if (not items.empty())
@@ -605,15 +605,15 @@ void checkAtomRecords(datablock &db)
{
std::vector<item> items;
if (not chem_comp_entry["type"])
if (chem_comp_entry["type"].empty())
items.emplace_back("type", compound->type());
if (not chem_comp_entry["mon_nstd_flag"] and non_std.has_value())
if (chem_comp_entry["mon_nstd_flag"].empty() and non_std.has_value())
items.emplace_back("mon_nstd_flag", non_std);
if (not chem_comp_entry["name"])
if (chem_comp_entry["name"].empty())
items.emplace_back("name", compound->name());
if (not chem_comp_entry["formula"])
if (chem_comp_entry["formula"].empty())
items.emplace_back("formula", compound->formula());
if (not chem_comp_entry["formula_weight"])
if (chem_comp_entry["formula_weight"].empty())
items.emplace_back("formula_weight", item_value{ compound->formula_weight(), 3 });
if (not items.empty())