自定义内存分配池
This commit is contained in:
@@ -63,8 +63,8 @@ int Input_Core::cur_search_pos() {
|
||||
pos_len = im_get_spl_start_pos(start_pos);
|
||||
return static_cast<int>(pos_len);
|
||||
}
|
||||
QStringList Input_Core::get_candidate(unsigned int candnum) {
|
||||
QStringList text_list;
|
||||
std::vector<QString> Input_Core::get_candidate(unsigned int candnum) {
|
||||
std::vector<QString> text_list;
|
||||
if (candnum == 0)
|
||||
return text_list;
|
||||
char16* cand_buf = new char16[m_out_len];
|
||||
@@ -72,7 +72,7 @@ QStringList Input_Core::get_candidate(unsigned int candnum) {
|
||||
char16* cand;
|
||||
cand = im_get_candidate(i, cand_buf, static_cast<unsigned int>(m_out_len));
|
||||
if (cand) {
|
||||
text_list.append(QString::fromUtf16(cand));
|
||||
text_list.push_back(QString::fromUtf16(cand));
|
||||
}
|
||||
else {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user