Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: components/ntp_snippets/category_factory.cc

Issue 2520853002: [NTP] Cleanup: add brackets in components/ntp_snippets. [2/2] (Closed)
Patch Set: "else if". Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/category_factory.cc
diff --git a/components/ntp_snippets/category_factory.cc b/components/ntp_snippets/category_factory.cc
index a8e0740b6196dd3c1c827e799a9a63254f801860..842dd6a65edccb160597206d783ed2ab8af29627 100644
--- a/components/ntp_snippets/category_factory.cc
+++ b/components/ntp_snippets/category_factory.cc
@@ -56,8 +56,9 @@ Category CategoryFactory::FromIDValue(int id) {
bool CategoryFactory::CompareCategories(const Category& left,
const Category& right) const {
- if (left == right)
+ if (left == right) {
return false;
+ }
return std::find(ordered_categories_.begin(), ordered_categories_.end(),
left) < std::find(ordered_categories_.begin(),
ordered_categories_.end(), right);
@@ -78,8 +79,9 @@ void CategoryFactory::AddKnownCategory(KnownCategories known_category) {
Category CategoryFactory::InternalFromID(int id) {
auto it = std::find(ordered_categories_.begin(), ordered_categories_.end(),
Category(id));
- if (it != ordered_categories_.end())
+ if (it != ordered_categories_.end()) {
return *it;
+ }
Category category(id);
ordered_categories_.push_back(category);
« no previous file with comments | « no previous file | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698