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-02-09 07:35:16 -08:00
parent a4ba5d4859
commit 5009698cc0
54 changed files with 244 additions and 240 deletions
+3 -3
View File
@@ -33,13 +33,13 @@
void Combo_keyScreen::CreateViews() {
using namespace UI;
I18NCategory *co = GetI18NCategory("Controls");
auto co = GetI18NCategory("Controls");
root_ = new LinearLayout(ORIENT_VERTICAL);
root_->Add(new ItemHeader(co->T("Combo Key Setting")));
LinearLayout *root__ = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(1.0));
root_->Add(root__);
LinearLayout *leftColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(120, FILL_PARENT));
I18NCategory *di = GetI18NCategory("Dialog");
auto di = GetI18NCategory("Dialog");
static const int comboKeyImages[5] = {
I_1, I_2, I_3, I_4, I_5,
@@ -113,7 +113,7 @@ void Combo_keyScreen::CreateViews() {
std::map<std::string, int>::iterator imageFinder;
I18NCategory *mc = GetI18NCategory("MappableControls");
auto mc = GetI18NCategory("MappableControls");
for (auto i = keyToggles.begin(); i != keyToggles.end(); ++i) {
LinearLayout *row = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));