[chromium-style] out-of-line default constructors and destructors

This commit is contained in:
Jeremy Apthorp 2018-04-17 16:37:22 -07:00
parent 6c26bb1cf8
commit f1587da480
48 changed files with 136 additions and 12 deletions

View file

@ -34,6 +34,10 @@ struct Transaction {
std::string errorMessage = "";
std::string transactionState = "";
Payment payment;
Transaction();
Transaction(const Transaction&);
~Transaction();
};
// --------------------------- Classes ---------------------------

View file

@ -174,6 +174,10 @@ using InAppTransactionCallback = base::RepeatingCallback<void(
namespace in_app_purchase {
Transaction::Transaction() = default;
Transaction::Transaction(const Transaction&) = default;
Transaction::~Transaction() = default;
TransactionObserver::TransactionObserver() : weak_ptr_factory_(this) {
obeserver_ = [[InAppTransactionObserver alloc]
initWithCallback:base::Bind(&TransactionObserver::OnTransactionsUpdated,

View file

@ -30,6 +30,10 @@ struct Product {
// Downloadable Content Information
bool downloadable = false;
Product(const Product&);
Product();
~Product();
};
// --------------------------- Typedefs ---------------------------

View file

@ -160,6 +160,10 @@
namespace in_app_purchase {
Product::Product() = default;
Product::Product(const Product&) = default;
Product::~Product() = default;
void GetProducts(const std::vector<std::string>& productIDs,
const InAppPurchaseProductsCallback& callback) {
auto* iapProduct = [[InAppPurchaseProduct alloc] initWithCallback:callback];