modernize C++: make unique
This commit is contained in:
@@ -283,7 +283,7 @@ void Cell::setContent(const char * value)
|
||||
if (owner->sheet()->isRestoring()) {
|
||||
if (value[0] == '\0' || (value[0] == '\'' && value[1] == '\0'))
|
||||
return;
|
||||
expression.reset(new App::StringExpression(owner->sheet(), value));
|
||||
expression = std::make_unique<App::StringExpression>(owner->sheet(), value);
|
||||
setUsed(EXPRESSION_SET, true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -675,7 +675,7 @@ void Sheet::updateProperty(CellAddress key)
|
||||
std::string s;
|
||||
|
||||
if (cell->getStringContent(s) && !s.empty())
|
||||
output.reset(new StringExpression(this, s));
|
||||
output = std::make_unique<StringExpression>(this, s);
|
||||
else {
|
||||
this->removeDynamicProperty(key.toString().c_str());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user