From 7e0add2eaab29583f7be363e0b413c5955d24a3e Mon Sep 17 00:00:00 2001 From: Jude Kwashie Date: Mon, 1 Sep 2025 07:53:44 +0000 Subject: [PATCH] chore: fix formatting issue for .cpp/.h files --- .../example/windows/runner/main.cpp | 2 +- .../example/windows/runner/main.cpp | 2 +- .../example/windows/runner/main.cpp | 2 +- .../windows/firebase_core_plugin.cpp | 36 +++++++++---------- .../windows/firebase_core_plugin.h | 16 ++++----- .../example/windows/runner/main.cpp | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/packages/cloud_firestore/cloud_firestore/example/windows/runner/main.cpp b/packages/cloud_firestore/cloud_firestore/example/windows/runner/main.cpp index a5a1cd3f91f0..10519d1ac390 100644 --- a/packages/cloud_firestore/cloud_firestore/example/windows/runner/main.cpp +++ b/packages/cloud_firestore/cloud_firestore/example/windows/runner/main.cpp @@ -10,7 +10,7 @@ #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { + _In_ wchar_t* command_line, _In_ int show_command) { // Attach to console when present (e.g., 'flutter run') or create a // new console when running with a debugger. if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { diff --git a/packages/firebase_auth/firebase_auth/example/windows/runner/main.cpp b/packages/firebase_auth/firebase_auth/example/windows/runner/main.cpp index bf07e45b3a4a..7a451dd2d11c 100644 --- a/packages/firebase_auth/firebase_auth/example/windows/runner/main.cpp +++ b/packages/firebase_auth/firebase_auth/example/windows/runner/main.cpp @@ -10,7 +10,7 @@ #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { + _In_ wchar_t* command_line, _In_ int show_command) { // Attach to console when present (e.g., 'flutter run') or create a // new console when running with a debugger. if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { diff --git a/packages/firebase_core/firebase_core/example/windows/runner/main.cpp b/packages/firebase_core/firebase_core/example/windows/runner/main.cpp index aa6bf684c007..2794d24a876b 100644 --- a/packages/firebase_core/firebase_core/example/windows/runner/main.cpp +++ b/packages/firebase_core/firebase_core/example/windows/runner/main.cpp @@ -10,7 +10,7 @@ #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { + _In_ wchar_t* command_line, _In_ int show_command) { // Attach to console when present (e.g., 'flutter run') or create a // new console when running with a debugger. if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { diff --git a/packages/firebase_core/firebase_core/windows/firebase_core_plugin.cpp b/packages/firebase_core/firebase_core/windows/firebase_core_plugin.cpp index f6c9ded368f5..b544e85ecb36 100644 --- a/packages/firebase_core/firebase_core/windows/firebase_core_plugin.cpp +++ b/packages/firebase_core/firebase_core/windows/firebase_core_plugin.cpp @@ -34,7 +34,7 @@ static std::string kLibraryName = "flutter-fire-core"; // static void FirebaseCorePlugin::RegisterWithRegistrar( - flutter::PluginRegistrarWindows *registrar) { + flutter::PluginRegistrarWindows* registrar) { auto plugin = std::make_unique(); FirebaseCoreHostApi::SetUp(registrar->messenger(), plugin.get()); @@ -53,7 +53,7 @@ FirebaseCorePlugin::~FirebaseCorePlugin() = default; // Convert a CoreFirebaseOptions to a Firebase Options. firebase::AppOptions CoreFirebaseOptionsToAppOptions( - const CoreFirebaseOptions &pigeon_options) { + const CoreFirebaseOptions& pigeon_options) { firebase::AppOptions options; options.set_api_key(pigeon_options.api_key().c_str()); options.set_app_id(pigeon_options.app_id().c_str()); @@ -74,19 +74,19 @@ firebase::AppOptions CoreFirebaseOptionsToAppOptions( } // Convert a AppOptions to CoreFirebaseOptions -CoreFirebaseOptions optionsFromFIROptions(const firebase::AppOptions &options) { +CoreFirebaseOptions optionsFromFIROptions(const firebase::AppOptions& options) { CoreFirebaseOptions pigeon_options = CoreFirebaseOptions(options.api_key(), options.app_id(), options.messaging_sender_id(), options.project_id()); // AppOptions initialises as empty char so we check to stop empty string to // Flutter Same for storage bucket below - const char *db_url = options.database_url(); + const char* db_url = options.database_url(); if (db_url != nullptr && db_url[0] != '\0') { pigeon_options.set_database_u_r_l(db_url); } pigeon_options.set_tracking_id(nullptr); - const char *storage_bucket = options.storage_bucket(); + const char* storage_bucket = options.storage_bucket(); if (storage_bucket != nullptr && storage_bucket[0] != '\0') { pigeon_options.set_storage_bucket(storage_bucket); } @@ -94,7 +94,7 @@ CoreFirebaseOptions optionsFromFIROptions(const firebase::AppOptions &options) { } // Convert a firebase::App to CoreInitializeResponse -CoreInitializeResponse AppToCoreInitializeResponse(const App &app) { +CoreInitializeResponse AppToCoreInitializeResponse(const App& app) { flutter::EncodableMap plugin_constants; CoreInitializeResponse response = CoreInitializeResponse( app.name(), optionsFromFIROptions(app.options()), plugin_constants); @@ -102,11 +102,11 @@ CoreInitializeResponse AppToCoreInitializeResponse(const App &app) { } void FirebaseCorePlugin::InitializeApp( - const std::string &app_name, - const CoreFirebaseOptions &initialize_app_request, + const std::string& app_name, + const CoreFirebaseOptions& initialize_app_request, std::function reply)> result) { // Create an app - App *app = + App* app = App::Create(CoreFirebaseOptionsToAppOptions(initialize_app_request), app_name.c_str()); @@ -118,14 +118,14 @@ void FirebaseCorePlugin::InitializeCore( std::function reply)> result) { // TODO: Missing function to get the list of currently initialized apps std::vector initializedApps; - std::vector all_apps = App::GetApps(); - for (const App *app : all_apps) { + std::vector all_apps = App::GetApps(); + for (const App* app : all_apps) { initializedApps.push_back(AppToCoreInitializeResponse(*app)); } flutter::EncodableList encodableList; - for (const auto &item : initializedApps) { + for (const auto& item : initializedApps) { encodableList.push_back(flutter::CustomEncodableValue(item)); } result(encodableList); @@ -135,9 +135,9 @@ void FirebaseCorePlugin::OptionsFromResource( std::function reply)> result) {} void FirebaseCorePlugin::SetAutomaticDataCollectionEnabled( - const std::string &app_name, bool enabled, + const std::string& app_name, bool enabled, std::function reply)> result) { - App *firebaseApp = App::GetInstance(app_name.c_str()); + App* firebaseApp = App::GetInstance(app_name.c_str()); if (firebaseApp != nullptr) { // TODO: Missing method } @@ -145,9 +145,9 @@ void FirebaseCorePlugin::SetAutomaticDataCollectionEnabled( } void FirebaseCorePlugin::SetAutomaticResourceManagementEnabled( - const std::string &app_name, bool enabled, + const std::string& app_name, bool enabled, std::function reply)> result) { - App *firebaseApp = App::GetInstance(app_name.c_str()); + App* firebaseApp = App::GetInstance(app_name.c_str()); if (firebaseApp != nullptr) { // TODO: Missing method } @@ -156,9 +156,9 @@ void FirebaseCorePlugin::SetAutomaticResourceManagementEnabled( } void FirebaseCorePlugin::Delete( - const std::string &app_name, + const std::string& app_name, std::function reply)> result) { - App *firebaseApp = App::GetInstance(app_name.c_str()); + App* firebaseApp = App::GetInstance(app_name.c_str()); if (firebaseApp != nullptr) { // TODO: Missing method } diff --git a/packages/firebase_core/firebase_core/windows/firebase_core_plugin.h b/packages/firebase_core/firebase_core/windows/firebase_core_plugin.h index 2044a25b8664..84eb21987fa3 100644 --- a/packages/firebase_core/firebase_core/windows/firebase_core_plugin.h +++ b/packages/firebase_core/firebase_core/windows/firebase_core_plugin.h @@ -21,20 +21,20 @@ class FirebaseCorePlugin : public flutter::Plugin, public FirebaseCoreHostApi, public FirebaseAppHostApi { public: - static void RegisterWithRegistrar(flutter::PluginRegistrarWindows *registrar); + static void RegisterWithRegistrar(flutter::PluginRegistrarWindows* registrar); FirebaseCorePlugin(); virtual ~FirebaseCorePlugin(); // Disallow copy and assign. - FirebaseCorePlugin(const FirebaseCorePlugin &) = delete; - FirebaseCorePlugin &operator=(const FirebaseCorePlugin &) = delete; + FirebaseCorePlugin(const FirebaseCorePlugin&) = delete; + FirebaseCorePlugin& operator=(const FirebaseCorePlugin&) = delete; // FirebaseCoreHostApi virtual void InitializeApp( - const std::string &app_name, - const CoreFirebaseOptions &initialize_app_request, + const std::string& app_name, + const CoreFirebaseOptions& initialize_app_request, std::function reply)> result) override; virtual void InitializeCore( @@ -45,13 +45,13 @@ class FirebaseCorePlugin : public flutter::Plugin, // FirebaseAppHostApi virtual void SetAutomaticDataCollectionEnabled( - const std::string &app_name, bool enabled, + const std::string& app_name, bool enabled, std::function reply)> result) override; virtual void SetAutomaticResourceManagementEnabled( - const std::string &app_name, bool enabled, + const std::string& app_name, bool enabled, std::function reply)> result) override; virtual void Delete( - const std::string &app_name, + const std::string& app_name, std::function reply)> result) override; private: diff --git a/packages/firebase_storage/firebase_storage/example/windows/runner/main.cpp b/packages/firebase_storage/firebase_storage/example/windows/runner/main.cpp index bf07e45b3a4a..7a451dd2d11c 100644 --- a/packages/firebase_storage/firebase_storage/example/windows/runner/main.cpp +++ b/packages/firebase_storage/firebase_storage/example/windows/runner/main.cpp @@ -10,7 +10,7 @@ #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { + _In_ wchar_t* command_line, _In_ int show_command) { // Attach to console when present (e.g., 'flutter run') or create a // new console when running with a debugger. if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {