@@ -980,8 +980,8 @@ VariableDerived &IO::DefineDerivedVariable(const std::string &name, const std::s
980980
981981 // create derived variable with the expression
982982 auto itVariablePair = m_VariablesDerived.emplace (
983- name, std::unique_ptr<VariableBase>( new VariableDerived (
984- name, derived_exp, expressionType, isConstant, varType, name_to_type) ));
983+ name, std::make_unique<VariableDerived>(name, derived_exp, expressionType, isConstant,
984+ varType, name_to_type));
985985 VariableDerived &variable = static_cast <VariableDerived &>(*itVariablePair.first ->second );
986986
987987 // check IO placeholder for variable operations
@@ -1026,9 +1026,8 @@ VariableStruct &IO::DefineStructVariable(const std::string &name, StructDefiniti
10261026 }
10271027 }
10281028
1029- auto itVariablePair =
1030- m_Variables.emplace (name, std::unique_ptr<VariableBase>(new VariableStruct (
1031- name, def, shape, start, count, constantDims)));
1029+ auto itVariablePair = m_Variables.emplace (
1030+ name, std::make_unique<VariableStruct>(name, def, shape, start, count, constantDims));
10321031
10331032 VariableStruct &variable = static_cast <VariableStruct &>(*itVariablePair.first ->second );
10341033
0 commit comments