Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
yukawa committed Oct 25, 2023
1 parent 006084c commit 2d0eb78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 5 additions & 7 deletions src/gui/base/msime_user_dictionary_importer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,10 @@ class MSIMEImportIterator
return;
}

std::string name;
for (int i = 0; i < pos_size; ++i) {
EncodingUtil::SjisToUtf8(reinterpret_cast<char *>(pos_table->szName),
&name);
pos_map_.insert(std::make_pair(pos_table->nPos, name));
pos_map_.try_emplace(pos_table->nPos,
EncodingUtil::SjisToUtf8(
reinterpret_cast<char *>(pos_table->szName)));
++pos_table;
}

Expand Down Expand Up @@ -195,9 +194,8 @@ class MSIMEImportIterator
// set comment
if (buf_[index_].pvComment != nullptr) {
if (buf_[index_].uct == IFED_UCT_STRING_SJIS) {
EncodingUtil::SjisToUtf8(
reinterpret_cast<const char *>(buf_[index_].pvComment),
&entry->comment);
entry->comment = EncodingUtil::SjisToUtf8(
reinterpret_cast<const char *>(buf_[index_].pvComment));
} else if (buf_[index_].uct == IFED_UCT_STRING_UNICODE) {
Util::WideToUtf8(
reinterpret_cast<const wchar_t *>(buf_[index_].pvComment),
Expand Down
3 changes: 1 addition & 2 deletions src/gui/dictionary_tool/dictionary_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,6 @@ void DictionaryTool::ImportFromDefaultIME() {
DCHECK(dic);

const int old_size = dic->entries_size();
const std::string dic_name = dic_info.item->text().toStdString();

UserDictionaryImporter::ErrorType error =
UserDictionaryImporter::IMPORT_NOT_SUPPORTED;
Expand All @@ -968,7 +967,7 @@ void DictionaryTool::ImportFromDefaultIME() {
OnDictionarySelectionChanged();
UpdateUIStatus();

ReportImportError(error, dic_name, added_entries_size);
ReportImportError(error, dic_info.item->text(), added_entries_size);
#endif // _WIN32
}

Expand Down

0 comments on commit 2d0eb78

Please sign in to comment.