Core: Use a shared_ptr for i18n categories.

This does not make them thread safe, but it reduces the chances of a crash
a bit (see #12594.)
This commit is contained in:
Unknown W. Brackets 2020-01-26 10:43:18 -08:00
parent a4ba5d4859
commit 5009698cc0
54 changed files with 244 additions and 240 deletions

View file

@ -181,8 +181,8 @@ void RemoteISOScreen::update() {
}
void RemoteISOScreen::CreateViews() {
I18NCategory *di = GetI18NCategory("Dialog");
I18NCategory *ri = GetI18NCategory("RemoteISO");
auto di = GetI18NCategory("Dialog");
auto ri = GetI18NCategory("RemoteISO");
Margins actionMenuMargins(0, 20, 15, 0);
Margins contentMargins(0, 20, 5, 5);
@ -276,8 +276,8 @@ RemoteISOConnectScreen::~RemoteISOConnectScreen() {
}
void RemoteISOConnectScreen::CreateViews() {
I18NCategory *di = GetI18NCategory("Dialog");
I18NCategory *ri = GetI18NCategory("RemoteISO");
auto di = GetI18NCategory("Dialog");
auto ri = GetI18NCategory("RemoteISO");
Margins actionMenuMargins(0, 20, 15, 0);
Margins contentMargins(0, 20, 5, 5);
@ -300,7 +300,7 @@ void RemoteISOConnectScreen::CreateViews() {
}
void RemoteISOConnectScreen::update() {
I18NCategory *ri = GetI18NCategory("RemoteISO");
auto ri = GetI18NCategory("RemoteISO");
UIScreenWithBackground::update();
@ -412,8 +412,8 @@ RemoteISOBrowseScreen::RemoteISOBrowseScreen(const std::string &url, const std::
void RemoteISOBrowseScreen::CreateViews() {
bool vertical = UseVerticalLayout();
I18NCategory *di = GetI18NCategory("Dialog");
I18NCategory *ri = GetI18NCategory("RemoteISO");
auto di = GetI18NCategory("Dialog");
auto ri = GetI18NCategory("RemoteISO");
Margins actionMenuMargins(0, 10, 10, 0);
@ -478,7 +478,7 @@ void RemoteISOSettingsScreen::update() {
}
void RemoteISOSettingsScreen::CreateViews() {
I18NCategory *ri = GetI18NCategory("RemoteISO");
auto ri = GetI18NCategory("RemoteISO");
ViewGroup *remoteisoSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, FILL_PARENT));
remoteisoSettingsScroll->SetTag("RemoteISOSettings");