diff --git a/td/telegram/InputInvoice.cpp b/td/telegram/InputInvoice.cpp index 273d4fbd7..f39aaf8a2 100644 --- a/td/telegram/InputInvoice.cpp +++ b/td/telegram/InputInvoice.cpp @@ -20,7 +20,7 @@ namespace td { -bool operator==(const Invoice &lhs, const Invoice &rhs) { +static bool operator==(const Invoice &lhs, const Invoice &rhs) { return lhs.is_test_ == rhs.is_test_ && lhs.need_name_ == rhs.need_name_ && lhs.need_phone_number_ == rhs.need_phone_number_ && lhs.need_email_address_ == rhs.need_email_address_ && lhs.need_shipping_address_ == rhs.need_shipping_address_ && @@ -32,27 +32,6 @@ bool operator==(const Invoice &lhs, const Invoice &rhs) { lhs.recurring_payment_terms_of_service_url_ == rhs.recurring_payment_terms_of_service_url_; } -bool operator!=(const Invoice &lhs, const Invoice &rhs) { - return !(lhs == rhs); -} - -StringBuilder &operator<<(StringBuilder &string_builder, const Invoice &invoice) { - return string_builder << "[" << (invoice.is_flexible_ ? "Flexible" : "") << (invoice.is_test_ ? "Test" : "") - << "Invoice" << (invoice.need_name_ ? ", needs name" : "") - << (invoice.need_phone_number_ ? ", needs phone number" : "") - << (invoice.need_email_address_ ? ", needs email address" : "") - << (invoice.need_shipping_address_ ? ", needs shipping address" : "") - << (invoice.send_phone_number_to_provider_ ? ", sends phone number to provider" : "") - << (invoice.send_email_address_to_provider_ ? ", sends email address to provider" : "") - << (invoice.recurring_payment_terms_of_service_url_.empty() - ? string() - : ", recurring payments terms of service at " + - invoice.recurring_payment_terms_of_service_url_) - << " in " << invoice.currency_ << " with price parts " << format::as_array(invoice.price_parts_) - << " and suggested tip amounts " << invoice.suggested_tip_amounts_ << " up to " - << invoice.max_tip_amount_ << "]"; -} - bool operator==(const InputInvoice &lhs, const InputInvoice &rhs) { return lhs.title_ == rhs.title_ && lhs.description_ == rhs.description_ && lhs.photo_ == rhs.photo_ && lhs.start_parameter_ == rhs.start_parameter_ && lhs.invoice_ == rhs.invoice_ && diff --git a/td/telegram/InputInvoice.h b/td/telegram/InputInvoice.h index d20ea54de..e2e79e11a 100644 --- a/td/telegram/InputInvoice.h +++ b/td/telegram/InputInvoice.h @@ -96,11 +96,6 @@ struct InputInvoice { DialogId owner_dialog_id, Td *td); }; -bool operator==(const Invoice &lhs, const Invoice &rhs); -bool operator!=(const Invoice &lhs, const Invoice &rhs); - -StringBuilder &operator<<(StringBuilder &string_builder, const Invoice &invoice); - bool operator==(const InputInvoice &lhs, const InputInvoice &rhs); bool operator!=(const InputInvoice &lhs, const InputInvoice &rhs);