Remove commented NotificationType::get_type().

GitOrigin-RevId: 23427ab1484fcba8dbaa81e770957c3d587f8d3a
This commit is contained in:
levlam 2019-05-03 23:22:49 +03:00
parent 92462100e8
commit e69463f81d
2 changed files with 5 additions and 28 deletions

View File

@ -53,11 +53,7 @@ class NotificationTypeMessage : public NotificationType {
StringBuilder &to_string_builder(StringBuilder &string_builder) const override { StringBuilder &to_string_builder(StringBuilder &string_builder) const override {
return string_builder << "NewMessageNotification[" << message_id_ << ']'; return string_builder << "NewMessageNotification[" << message_id_ << ']';
} }
/*
Type get_type() const override {
return Type::Message;
}
*/
MessageId message_id_; MessageId message_id_;
public: public:
@ -89,11 +85,7 @@ class NotificationTypeSecretChat : public NotificationType {
StringBuilder &to_string_builder(StringBuilder &string_builder) const override { StringBuilder &to_string_builder(StringBuilder &string_builder) const override {
return string_builder << "NewSecretChatNotification[]"; return string_builder << "NewSecretChatNotification[]";
} }
/*
Type get_type() const override {
return Type::SecretChat;
}
*/
public: public:
NotificationTypeSecretChat() { NotificationTypeSecretChat() {
} }
@ -123,11 +115,7 @@ class NotificationTypeCall : public NotificationType {
StringBuilder &to_string_builder(StringBuilder &string_builder) const override { StringBuilder &to_string_builder(StringBuilder &string_builder) const override {
return string_builder << "NewCallNotification[" << call_id_ << ']'; return string_builder << "NewCallNotification[" << call_id_ << ']';
} }
/*
Type get_type() const override {
return Type::Call;
}
*/
CallId call_id_; CallId call_id_;
public: public:
@ -335,11 +323,7 @@ class NotificationTypePushMessage : public NotificationType {
return string_builder << "NewPushMessageNotification[" << sender_user_id_ << ", " << message_id_ << ", " << key_ return string_builder << "NewPushMessageNotification[" << sender_user_id_ << ", " << message_id_ << ", " << key_
<< ", " << arg_ << ", " << photo_ << ", " << document_ << ']'; << ", " << arg_ << ", " << photo_ << ", " << document_ << ']';
} }
/*
Type get_type() const override {
return Type::PushMessage;
}
*/
UserId sender_user_id_; UserId sender_user_id_;
MessageId message_id_; MessageId message_id_;
string key_; string key_;

View File

@ -27,9 +27,7 @@ class NotificationType {
NotificationType &operator=(const NotificationType &) = delete; NotificationType &operator=(const NotificationType &) = delete;
NotificationType(NotificationType &&) = delete; NotificationType(NotificationType &&) = delete;
NotificationType &operator=(NotificationType &&) = delete; NotificationType &operator=(NotificationType &&) = delete;
virtual ~NotificationType() = default;
virtual ~NotificationType() {
}
virtual bool can_be_delayed() const = 0; virtual bool can_be_delayed() const = 0;
@ -42,11 +40,6 @@ class NotificationType {
virtual td_api::object_ptr<td_api::NotificationType> get_notification_type_object(DialogId dialog_id) const = 0; virtual td_api::object_ptr<td_api::NotificationType> get_notification_type_object(DialogId dialog_id) const = 0;
virtual StringBuilder &to_string_builder(StringBuilder &string_builder) const = 0; virtual StringBuilder &to_string_builder(StringBuilder &string_builder) const = 0;
protected:
// enum class Type : int32 { Message, SecretChat, Call, PushMessage };
// virtual Type get_type() const = 0;
}; };
inline StringBuilder &operator<<(StringBuilder &string_builder, const NotificationType &notification_type) { inline StringBuilder &operator<<(StringBuilder &string_builder, const NotificationType &notification_type) {