re-add some nullptr

to be safe since their removal within assert() or bools might have some impact I don't know
This commit is contained in:
Uwe
2022-07-18 02:32:36 +02:00
parent 1f04880da9
commit 5d76afe0a5
8 changed files with 23 additions and 24 deletions

View File

@@ -578,14 +578,14 @@ Cell * PropertySheet::nonNullCellAt(CellAddress address)
void PropertySheet::setContent(CellAddress address, const char *value)
{
Cell * cell = nonNullCellAt(address);
assert(cell);
assert(cell != nullptr);
cell->setContent(value);
}
void PropertySheet::setAlignment(CellAddress address, int _alignment)
{
Cell * cell = nonNullCellAt(address);
assert(cell);
assert(cell != nullptr);
if (cell->address != address) //Reject alignment change for merged cell except top-left one
return;
cell->setAlignment(_alignment);
@@ -594,28 +594,28 @@ void PropertySheet::setAlignment(CellAddress address, int _alignment)
void PropertySheet::setStyle(CellAddress address, const std::set<std::string> &_style)
{
Cell * cell = nonNullCellAt(address);
assert(cell);
assert(cell != nullptr);
cell->setStyle(_style);
}
void PropertySheet::setForeground(CellAddress address, const App::Color &color)
{
Cell * cell = nonNullCellAt(address);
assert(cell);
assert(cell != nullptr);
cell->setForeground(color);
}
void PropertySheet::setBackground(CellAddress address, const App::Color &color)
{
Cell * cell = nonNullCellAt(address);
assert(cell);
assert(cell != nullptr);
cell->setBackground(color);
}
void PropertySheet::setDisplayUnit(CellAddress address, const std::string &unit)
{
Cell * cell = nonNullCellAt(address);
assert(cell);
assert(cell != nullptr);
cell->setDisplayUnit(unit);
}
@@ -627,7 +627,7 @@ void PropertySheet::setAlias(CellAddress address, const std::string &alias)
const Cell * aliasedCell = getValueFromAlias(alias);
Cell * cell = nonNullCellAt(address);
assert(cell);
assert(cell != nullptr);
if(aliasedCell == cell)
return;
@@ -671,14 +671,14 @@ void PropertySheet::setAlias(CellAddress address, const std::string &alias)
void PropertySheet::setComputedUnit(CellAddress address, const Base::Unit &unit)
{
Cell * cell = nonNullCellAt(address);
assert(cell);
assert(cell != nullptr);
cell->setComputedUnit(unit);
}
void PropertySheet::setSpans(CellAddress address, int rows, int columns)
{
Cell * cell = nonNullCellAt(address);
assert(cell);
assert(cell != nullptr);
cell->setSpans(rows, columns);
}