2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Use nullptr instead of std::unique_ptr<Type>().

This commit is contained in:
John Preston
2017-08-13 19:14:00 +03:00
parent 0bea2620b5
commit 012d59ab42
11 changed files with 29 additions and 24 deletions

View File

@@ -78,12 +78,13 @@ void PrivacyExceptionsBoxController::rowClicked(gsl::not_null<PeerListRow*> row)
}
std::unique_ptr<PrivacyExceptionsBoxController::Row> PrivacyExceptionsBoxController::createRow(gsl::not_null<History*> history) {
if (auto user = history->peer->asUser()) {
if (!user->isSelf()) {
return std::make_unique<Row>(history);
}
if (history->peer->isSelf()) {
return nullptr;
}
return std::unique_ptr<Row>();
if (auto user = history->peer->asUser()) {
return std::make_unique<Row>(history);
}
return nullptr;
}
} // namespace