Revision: 6520
Author: nogu.dev
Date: Sat Jul 17 23:24:24 2010
Log: * qt4/immodule/candidatetablewindow.cpp
- (CandidateTableWindow::getPosition): Optimize.
http://code.google.com/p/uim/source/detail?r=6520
Modified:
/trunk/qt4/immodule/candidatetablewindow.cpp
=======================================
--- /trunk/qt4/immodule/candidatetablewindow.cpp Sat Jul 17 22:32:00 2010
+++ /trunk/qt4/immodule/candidatetablewindow.cpp Sat Jul 17 23:24:24 2010
@@ -275,20 +275,20 @@
void CandidateTableWindow::getPosition(int &row, int &column,
const QString &headString)
{
- int index = 0;
+ char *ch = table;
for (int i = 0; i < TABLE_NR_ROWS; i++) {
for (int j = 0; j < TABLE_NR_COLUMNS; j++) {
- if (table[index] == '\0') {
- index++;
+ if (*ch == '\0') {
+ ch++;
continue;
}
- const char str[] = {table[index], '\0'};
+ const char str[] = {*ch, '\0'};
if (headString == QLatin1String(str)) {
row = i;
column = j;
return;
}
- index++;
+ ch++;
}
}
}