simplifying a function
Dramatic simplification of legacy code by separating code and data and applying some later C++. Function removed from Application.cpp as it was in a anonymous namespace and could not easily be subjected to unit testing. Added ProgramOptionsUtilities.h
This commit is contained in:
@@ -89,7 +89,7 @@ void PropertyQuantity::setPyObject(PyObject *value)
|
||||
{
|
||||
// Set the unit if Unit object supplied, else check the unit
|
||||
// and set the value
|
||||
|
||||
|
||||
if (PyObject_TypeCheck(value, &(UnitPy::Type))) {
|
||||
Base::UnitPy *pcObject = static_cast<Base::UnitPy*>(value);
|
||||
Base::Unit unit = *(pcObject->getUnitPtr());
|
||||
|
||||
Reference in New Issue
Block a user