diff --git a/search/hotels_classifier.hpp b/search/hotels_classifier.hpp index 88cf39874e..c6b27cf55d 100644 --- a/search/hotels_classifier.hpp +++ b/search/hotels_classifier.hpp @@ -4,9 +4,9 @@ namespace search { -// A binary classifier that can be used in conjunction with search -// engine to decide whether the majority of results are hotels or not. -// +// A binary classifier that can be used in conjunction with search +// engine to decide whether the majority of results are hotels or not. +// // *NOTE* This class is NOT thread safe. class HotelsClassifier { diff --git a/search/result.cpp b/search/result.cpp index 537cfdfa11..2d7c176ad2 100644 --- a/search/result.cpp +++ b/search/result.cpp @@ -191,7 +191,7 @@ void Results::AddResultNoChecks(Result && result) void Results::Clear() { m_results.clear(); - m_status = STATUS_NONE; + m_status = Status::None; } size_t Results::GetSuggestsCount() const diff --git a/search/result.hpp b/search/result.hpp index 3048777eda..aeb5a9b17c 100644 --- a/search/result.hpp +++ b/search/result.hpp @@ -138,18 +138,18 @@ public: Results(); - inline bool IsEndMarker() const { return m_status != STATUS_NONE; } - inline bool IsEndedNormal() const { return m_status == STATUS_ENDED_NORMAL; } - inline bool IsEndedCancelled() const { return m_status == STATUS_ENDED_CANCELLED; } + inline bool IsEndMarker() const { return m_status != Status::None; } + inline bool IsEndedNormal() const { return m_status == Status::EndedNormal; } + inline bool IsEndedCancelled() const { return m_status == Status::EndedCancelled; } void SetEndMarker(bool cancelled) { - m_status = cancelled ? STATUS_ENDED_CANCELLED : STATUS_ENDED_NORMAL; + m_status = cancelled ? Status::EndedCancelled : Status::EndedNormal; } bool AddResult(Result && result); - // Fast version of AddResult() that don't do any duplicates checks. + // Fast version of AddResult() that doesn't do any duplicates checks. void AddResultNoChecks(Result && result); void Clear(); @@ -175,11 +175,11 @@ public: inline void Swap(Results & rhs) { m_results.swap(rhs.m_results); } private: - enum Status + enum class Status { - STATUS_NONE, - STATUS_ENDED_CANCELLED, - STATUS_ENDED_NORMAL + None, + EndedCancelled, + EndedNormal }; // Inserts |result| in |m_results| at position denoted by |where|.