Skip to content

Commit

Permalink
fix(core, windows): remove unused map of string that was causing a cr…
Browse files Browse the repository at this point in the history
…ash (#11745)
  • Loading branch information
Lyokone committed Oct 23, 2023
1 parent edddc1d commit 895da05
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ void FirebaseCorePlugin::RegisterWithRegistrar(
registrar->AddPlugin(std::move(plugin));
}

std::map<std::string, std::vector<std::string>> apps;

FirebaseCorePlugin::FirebaseCorePlugin() {}

FirebaseCorePlugin::~FirebaseCorePlugin() = default;
Expand Down Expand Up @@ -103,20 +101,6 @@ void FirebaseCorePlugin::InitializeApp(
App::Create(PigeonFirebaseOptionsToAppOptions(initialize_app_request),
app_name.c_str());

auto app_it = apps.find(app_name);

// If the app is already in the map, return the stored shared_ptr
if (app_it == apps.end()) {
std::vector<std::string> app_vector;
app_vector.push_back(app_name);
app_vector.push_back(initialize_app_request.api_key());
app_vector.push_back(initialize_app_request.app_id());
app_vector.push_back(*initialize_app_request.database_u_r_l());
app_vector.push_back(initialize_app_request.project_id());

apps[app_name] = app_vector;
}

// Send back the result to Flutter
result(AppToPigeonInitializeResponse(*app));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class FirebaseCorePlugin : public flutter::Plugin,

private:
bool coreInitialized = false;
static std::map<std::string, std::vector<std::string>> firebase_apps;
};

} // namespace firebase_core_windows
Expand Down

0 comments on commit 895da05

Please sign in to comment.